-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[flake8-use-pathlib] Fix PTH104false positive when rename is passed a file descriptor
#17712
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
Conversation
…ssed a file descriptor or bytes string
|
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/replaceable_by_pathlib.rs
Outdated
Show resolved
Hide resolved
MichaReiser
left a 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.
Thank you. Lets remove the bytes string handling for now (sorry for that)
flake8-use-pathlib] Fix PTH104false positive when rename is passed a file descriptor or bytes stringflake8-use-pathlib] Fix PTH104false positive when rename is passed a file descriptor
|
Oh thanks for opening the other PR! We were preparing for the release today and I just pushed similar changes here. I opted to leave the test cases, but otherwise they look very similar. |
...lake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__full_name.py.snap
Show resolved
Hide resolved
* main: [red-knot] Refactor: no mutability in call APIs (#17788) [red-knot] Fix panic for `tuple[x[y]]` string annotation (#17787) [red-knot] Implicit instance attributes in generic methods (#17769) doc: Add link to `check-typed-exception` from `S110` and `S112` (#17786) Fix module name in ASYNC110, 115, and 116 fixes (#17774) [red-knot] More informative hover-types for assignments (#17762) [syntax-errors] Use consistent message for bad starred expression usage. (#17772) red_knot_server: add auto-completion MVP Allow passing a virtual environment to `ruff analyze graph` (#17743) Bump 0.11.8 (#17766) [`flake8-use-pathlib`] Fix `PTH104`false positive when `rename` is passed a file descriptor (#17712)
Summary
Contains the same changes to the semantic type inference as #17705.
Fixes #17694
Test Plan
Snapshot tests.