Skip to content

Releases: snok/flake8-type-checking

v2.5.0

17 Oct 07:51

Choose a tag to compare

What's Changed

This release adds two new error codes:

  • TC007: Type alias needs to be made into a string literal
  • TC008: Type alias does not need to be a string literal

which will make the plugin handle TypeAliases, and corresponding imports, correctly.

The same PR also fixed false positive TC201 errors. Kudos to @Daverball for making it happen 👏

Full Changelog: v2.4.2...v2.5.0

v2.4.2

06 Oct 09:19

Choose a tag to compare

What's new

  • perf: Make is_exempt_module work with an iterator by @iurisilvio in #162
  • fix: Annotations inside if TYPE_CHECKING: should not result in TC200 by @Daverball in #165
  • fix: Prevent false positive TC004 when variable name matches name of module in TYPE_CHECKING block by @sondrelg in #161
  • fix: Wrapped annotations with subscripted types should not raise TC201 by @Daverball in #166
  • fix: TC201 should never emit for classes defined in-file by @Daverball in #167

New Contributors

Full Changelog: v2.4.1...v2.4.2

v2.4.1

16 Jul 09:06

Choose a tag to compare

Fixes

  • Add detection for if TYPE_CHECKING is True operation by @iamibi in #157

Other

New Contributors

Full Changelog: v2.4.0...v2.4.1

v2.4.0

28 Mar 07:07

Choose a tag to compare

What's Changed

  • Made it possible to skip modules using wildcard notation (*), by @KozyrevIvan in #155

New Contributors

Full Changelog: v2.3.1...v2.4.0

v2.3.1

08 Mar 18:08

Choose a tag to compare

What's Changed

This release disables the plugin for stubs (*.pyi) files. Considered a bugfix rather than a breaking change, since the rules of the plugin don't apply there.

New Contributors

Full Changelog: v2.3.0...v2.3.1

v2.3.0

20 Nov 20:30

Choose a tag to compare

New features

  • feat: Support use of TYPE_CHECKING with simple boolean logic by @steverice in #142

Maintenance

New Contributors

Full Changelog: v2.2.0...v2.3.0

v2.2.0

16 Oct 11:06

Choose a tag to compare

New features

  • feat: Add strict setting to opt-into v1 behavior by @sondrelg in #138

Bugfixes

Maintenance

  • chore: Update Poetry version to 1.2.0 by @sondrelg in #132
  • chore: remove upper bound from Python version specifier by @sisp in #134
  • docs: Expand and correct examples by @sondrelg in #135

New Contributors

  • @sisp made their first contribution in #134

Full Changelog: v2.1.3...v2.2.0

v2.1.3

01 Sep 21:02

Choose a tag to compare

Fixes

  • Adds missing attrs aliases (#133).

v2.1.2

04 Aug 21:23

Choose a tag to compare

Fixes

  • No longer flags TC001 (Move import into a type checking block) errors when imports are actually just completely unused. This error is already covered by F401.

v2.1.1

04 Aug 18:41

Choose a tag to compare

Fixes

  • Correct TC101 (... does not need to be a string literal) logic so it only flags string literals (#122 by @shiftinv)
  • Fix a TC004 issue (Move import ... out of type-checking block) where we weren't handling all imports (#123 by @shiftinv)
  • Fix TC002 (Move import ... into type checking block) false positives (#124)