-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[flake8-use-pathlib] Make fixes unsafe when types change in compound statements (PTH104, PTH105, PTH109, PTH115)
#22009
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
flake8-use-pathlib]flake8-use-pathlib] Fix PTH's unsafe handling when return types change in compound statements
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| PTH109 | 26 | 0 | 0 | 0 | 26 |
ntBre
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.
Thanks for working on this! But I think we need to be a bit more careful here.
ntBre
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.
Thanks for the quick fix! I think the logic here is good to go, I just had one small suggestion about combining the two helper functions.
Yes, I think it makes sense to combine them. |
ntBre
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!
flake8-use-pathlib] Fix PTH's unsafe handling when return types change in compound statementsflake8-use-pathlib] Make fixes unsafe when types change in compound statements (PTH104, PTH105, PTH109, PTH115)
Summary
Fixes #21794
Test Plan
cargo nextest run flake8_use_pathlib