Skip to content

Use Self type from PEP 673 - #327

Merged
pjbull merged 2 commits into
masterfrom
jyq-selftype
Apr 16, 2023
Merged

Use Self type from PEP 673#327
pjbull merged 2 commits into
masterfrom
jyq-selftype

Conversation

@jayqi

@jayqi jayqi commented Apr 16, 2023

Copy link
Copy Markdown
Member

This PR replaces the custom type variable DerivedCloudPath with the special type Self added in Python 3.11 (adds typing_extensions backport dependency for older Python versions). This works in a functionally identical way as what we had before, as explained in the official docs, but is a part of the standard library and much more readable.

For more context, see PEP 673.

@github-actions

github-actions Bot commented Apr 16, 2023

Copy link
Copy Markdown
Contributor

@github-actions
github-actions Bot temporarily deployed to pull request April 16, 2023 04:13 Inactive
@codecov

codecov Bot commented Apr 16, 2023

Copy link
Copy Markdown

Codecov Report

Merging #327 (a73fa00) into master (a0dd927) will decrease coverage by 0.2%.
The diff coverage is 100.0%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #327     +/-   ##
========================================
- Coverage    94.5%   94.3%   -0.2%     
========================================
  Files          22      22             
  Lines        1463    1466      +3     
========================================
  Hits         1383    1383             
- Misses         80      83      +3     
Impacted Files Coverage Δ
cloudpathlib/cloudpath.py 92.9% <100.0%> (-0.4%) ⬇️

... and 1 file with indirect coverage changes

@github-actions
github-actions Bot temporarily deployed to pull request April 16, 2023 04:19 Inactive
@jayqi
jayqi requested a review from pjbull April 16, 2023 19:04
@pjbull

pjbull commented Apr 16, 2023

Copy link
Copy Markdown
Member

Nice!

@pjbull
pjbull merged commit 28b2eb5 into master Apr 16, 2023
@jayqi
jayqi deleted the jyq-selftype branch April 16, 2023 22:58
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.

2 participants