ruff
de5264fe - [`flake8-use-pathlib`] Make example error out-of-the-box (`PTH210`) (#19189)

Commit
71 days ago
[`flake8-use-pathlib`] Make example error out-of-the-box (`PTH210`) (#19189) <!-- Thank you for contributing to Ruff/ty! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? (Please prefix with `[ty]` for ty pull requests.) - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> Part of #18972 This PR makes [invalid-pathlib-with-suffix (PTH210)](https://docs.astral.sh/ruff/rules/invalid-pathlib-with-suffix/#invalid-pathlib-with-suffix-pth210)'s example error out-of-the-box. [Old example](https://play.ruff.rs/d45720cc-fd08-4443-820f-b3bc9756ac59) ```py path.with_suffix("py") ``` [New example](https://play.ruff.rs/4103669e-19c5-464a-a3fb-6e7d190ce5fd) ```py from pathlib import Path path = Path() path.with_suffix("py") ``` The "Use instead" section was also modified similarly. ## Test Plan <!-- How was it tested? --> N/A, no functionality/tests affected
Author
Parents
Loading