Skip to content

Conversation

@Daverball
Copy link
Collaborator

Closes #206

This adds a new setting type-checking-py314plus for enabling PEP-649 semantics when analyzing annotations.

Currently this setting has the same effect as adding a from __future__ import annotations import to every file we're analyzing, although in the future the detailed semantics may diverge ever so slightly, if necessary.

We may also consider adding a rule for removing from __future__ import annotations imports when Python 3.14+ mode is active, although that is a little more controversial, since the runtime behavior is still different in 3.14+ when that import is present, so removing it can cause subtle breakages in code that was previously working, albeit only rarely. That rule may also overlap with other plugins, since there are already other plugins for removing outdated futures imports.

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.4%. Comparing base (7d24f79) to head (06c3cff).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #207   +/-   ##
=====================================
  Coverage   96.4%   96.4%           
=====================================
  Files          4       4           
  Lines        959     968    +9     
=====================================
+ Hits         925     934    +9     
  Misses        34      34           
Files with missing lines Coverage Δ
flake8_type_checking/checker.py 96.1% <100.0%> (+<0.1%) ⬆️
flake8_type_checking/plugin.py 100.0% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Daverball Daverball merged commit 4fa3651 into snok:main Jan 8, 2026
7 checks passed
@Daverball Daverball deleted the feat/pep649 branch January 8, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

annotations as string literal on Python 3.14

1 participant