[flake8-use-pathlib] Make PTH119 and PTH120 fixes unsafe because they can change behavior#20118
Conversation
…e they can change behavior
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| PTH120 | 570 | 0 | 0 | 0 | 570 |
| PTH119 | 210 | 0 | 0 | 0 | 210 |
|
Another normalization that could be worth mentioning is that |
# Conflicts: # crates/ruff_linter/src/rules/flake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__preview_full_name.py.snap # crates/ruff_linter/src/rules/flake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__preview_import_as.py.snap # crates/ruff_linter/src/rules/flake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__preview_import_from.py.snap # crates/ruff_linter/src/rules/flake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__preview_import_from_as.py.snap
dylwil3
left a comment
There was a problem hiding this comment.
Thank you! Small tweak in wording and a question about factoring out some shared code
|
@dylwil3 idk if we could use |
Clippy doesn't seem to complain locally if I remove the |
|
hmm, it's weird, i had something like 7>6, but if CI passes, it's okay! |
…e they can change behavior (astral-sh#20118) ## Summary Fixes astral-sh#20112 ## Test Plan `cargo nextest run flake8_use_pathlib` --------- Co-authored-by: dylwil3 <[email protected]>
Summary
Fixes #20112
Test Plan
cargo nextest run flake8_use_pathlib