Skip to content

[flake8-type-checking] Clarify import cycle wording for TC001/TC002/TC003#24322

Merged
MichaReiser merged 1 commit intoastral-sh:mainfrom
Redovo1:docs/tc001-tc003-import-cycles
Apr 2, 2026
Merged

[flake8-type-checking] Clarify import cycle wording for TC001/TC002/TC003#24322
MichaReiser merged 1 commit intoastral-sh:mainfrom
Redovo1:docs/tc001-tc003-import-cycles

Conversation

@Redovo1
Copy link
Copy Markdown
Contributor

@Redovo1 Redovo1 commented Mar 31, 2026

Summary

Clarify the Why is this bad? wording for TC001, TC002, and TC003.

The previous wording mentioned import cycles for all three rules, which is misleading for TC002 and TC003. This change keeps the import-cycle note for first-party imports (TC001), but removes it from the third-party and standard-library variants.

Closes #15552

Test Plan

Docs-only change.

@astral-sh-bot astral-sh-bot bot requested a review from ntBre March 31, 2026 05:44
@MichaReiser MichaReiser added the documentation Improvements or additions to documentation label Apr 2, 2026
Copy link
Copy Markdown
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@MichaReiser MichaReiser enabled auto-merge (squash) April 2, 2026 13:57
@MichaReiser MichaReiser merged commit da7b958 into astral-sh:main Apr 2, 2026
41 checks passed
carljm added a commit that referenced this pull request Apr 2, 2026
* main:
  Add a "release-gate" step to the release workflow (#24365)
  Disallow starred expressions as values of starred expressions (#24280)
  [`pyupgrade`] Ignore strings with string-only escapes (`UP012`) (#16058)
  [ty] Improve consistency and quality of diagnostics relating to invalid type forms (#24325)
  [flake8-type-checking] Clarify import cycle wording for TC001/TC002/TC003 (#24322)
  [`flake8-errmsg`] Avoid shadowing existing `msg` in fix for `EM101` (#24363)
  `RUF072`: skip formfeeds on dedent (#24308)
  Replace unmaintained `unic-ucd-category` crate with `icu_properties` (#24344)
  [ty] Replace markdown hard line breaks in snapshot tests (#24361)
  [ty] Move snapshot for code action test with trailing whitespace to external file (#24359)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TC001, TC002, TC003 - documentation mentions import cycles which is misleading

3 participants