Skip to content

Make CloudPath Pathlike - #72

Merged
jayqi merged 5 commits into
masterfrom
cszc-pathlike
Oct 2, 2020
Merged

jayqi merged 5 commits into
masterfrom
cszc-pathlike

Conversation

@cszc

@cszc cszc commented Sep 4, 2020 •

Copy link
Copy Markdown
Contributor

closes #47
Added an __fspath__ instance method and two tests for s3 and Azure

@cszc
cszc requested review from jayqi and pjbull September 4, 2020 22:06
Comment thread tests/test_s3_specific.py Outdated
Comment thread cloudpathlib/cloudpath.py Outdated
Comment thread tests/test_s3_specific.py Outdated
@cszc

cszc commented Oct 2, 2020 •

Copy link
Copy Markdown
Contributor Author

@jayqi @pjbull ready for re-review
Changes:

  • __fspath__ returns str(self._local) instead of str(self)
  • calls _refresh_cache before returning fspath (after checking if it's a file)
  • adds public .fspath property
  • combines and moves test to test_cloudpath_instantiation.py
  • adds tests test_fspath and test_os_open

@cszc
cszc requested a review from jayqi October 2, 2020 21:23
Comment thread cloudpathlib/cloudpath.py
@github-actions

github-actions Bot commented Oct 2, 2020

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Oct 2, 2020

Copy link
Copy Markdown

Codecov Report

Merging #72 into master will decrease coverage by 0.0%.
The diff coverage is 85.7%.

@@           Coverage Diff            @@
##           master     #72     +/-   ##
========================================
- Coverage    92.4%   92.3%   -0.1%     
========================================
  Files           9       9             
  Lines         659     666      +7     
========================================
+ Hits          609     615      +6     
- Misses         50      51      +1     
Impacted Files Coverage Δ
cloudpathlib/cloudpath.py 90.0% <85.7%> (-0.1%) ⬇️

@jayqi
jayqi self-requested a review October 2, 2020 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloud paths should be PathLike

3 participants