ruff
1fd48120 - [`flake8-type-checking`] Make example error out-of-the-box (`TC001`) (#19151)

Commit
69 days ago
[`flake8-type-checking`] Make example error out-of-the-box (`TC001`) (#19151) ## Summary Part of #18972 This PR makes [typing-only-first-party-import (TC001)](https://docs.astral.sh/ruff/rules/typing-only-first-party-import/#typing-only-first-party-import-tc001)'s example error out-of-the-box. The old example raised `TC002` instead of `TC001`, so this makes it a `from .` import to fix that. [Old example](https://play.ruff.rs/1fdbb293-86fc-4ed2-b2ff-b4836cea0c59) ```py from __future__ import annotations import local_module def func(sized: local_module.Container) -> int: return len(sized) ``` [New example](https://play.ruff.rs/b886535c-9203-48bb-812b-1aa306f2c287) ```py from __future__ import annotations from . import local_module def func(sized: local_module.Container) -> int: return len(sized) ``` The "Use instead" section was also modified similarly. ## Test Plan <!-- How was it tested? --> N/A, no functionality/tests affected
Author
Parents
Loading