-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add Path.copy_into
for 3.14
#13998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Path.copy_into
for 3.14
#13998
Conversation
|
||
pth = MyCustomPath.from_uri("file:///tmp/abc.txt") | ||
# If the destination is a non-Path, it should default to a base Path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems the opposite of the behavior the tests show.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, originally had different behavior until I corrected it - missed this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment has been minimized.
This comment has been minimized.
Moving back to draft until I can fix issues. |
The mypy-primer diff is the opposite of #13985, very suspicious. |
5e8d1bf
to
cf5969d
Compare
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Adds
copy_into
forPath
, there is some slightly interesting behavior around the fact in that if a destination that is aPurePath
than than the path will return will match that class - otherwisetype(self)
is used. As a result, added a test to ensure we maintain this behavior.