Skip to content

Releases: snok/flake8-type-checking

v2.9.1

28 May 12:00
a0d83eb
Compare
Choose a tag to compare

What's Changed

  • fix: Annotation assignments in function scope should never be quoted in #187

Full Changelog: v2.9.0...v2.9.1

v2.9.0

29 Jan 08:55
fae7589
Compare
Choose a tag to compare

New features

  • Added support for PEP646 syntax for unpacking TypeVarTuple in #183
  • Added TC010 which detects invalid use of string literals with | in #184

Full Changelog: v2.8.0...v2.9.0

v2.8.0

07 Dec 12:20
d4a7162
Compare
Choose a tag to compare

New features

Full Changelog: v2.7.0...v2.8.0

v2.7.0

29 Nov 13:29
Compare
Choose a tag to compare

New features

New Contributors

Full Changelog: v2.6.0...v2.7.0

v2.6.0

25 Nov 14:09
Compare
Choose a tag to compare

What's Changed

#174 (by @Daverball) refactors the internals of the plugin to get better awareness of scopes.

This:

  • Fixes scoping edge-case issues (#131)
  • Fixes some false positive TC100/TC101 cases
  • Fixes some rare cases where both a TC004/TC009 and a TC100/TC200 were emitted for the same symbol

Secondly, the PR adds support for PEP695 and adds a new plugin error code:

TC009 Move declaration out of type-checking block. Variable is used for more than type hinting

This error code is distinct from the existing, similarly sounding TC004 error, and is used to flag issues related to TypeVar definitions.

Full Changelog: v2.5.1...v2.6.0

v2.5.1

17 Oct 22:32
Compare
Choose a tag to compare

What's Changed

  • fix: Avoid potentially harmful TC201 false positives by @Daverball in #173

Full Changelog: v2.5.0...v2.5.1

v2.5.0

17 Oct 07:51
Compare
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
Compare
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
Compare
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
Compare
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