Skip to content

Add suggestion or fix for FA102 (future-required-type-annotation) #8682

@RunDevelopment

Description

@RunDevelopment

The rule FA102 (future-required-type-annotation) is very useful when writing code in a code base that support python <3.10. The only issue with this rule is that it only tells you that a from __future__ import annotations is required, it doesn't have any way of applying the suggested fix.

Please add a suggestion or fix for this rule to automatically add the missing from __future__ import annotations.

Code example:

# py 3.8 code base
def foo(l: list[int]): ...

Metadata

Metadata

Assignees

Labels

fixesRelated to suggested fixes for violations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions