Skip to content

Latest commit

 

History

History
81 lines (63 loc) · 3.1 KB

File metadata and controls

81 lines (63 loc) · 3.1 KB

PyAnnotations Plugin Roadmap

Current State (v2026.1)

The plugin provides 21 inspections for Python type annotation simplification and validation:

Core Union Inspections

  • UnionWithNoneInspectionUnion[X, None]Optional[X]
  • UnionWithObjectInspectionUnion[X, object]object
  • UnionWithOneChildToChildInspectionUnion[X]X
  • RedundantOptionalInspectionOptional[Optional[X]]Optional[X]
  • AnyInUnionInspectionUnion[X, Any]Any
  • DuplicateTypesInUnionInspectionUnion[int, int, str]Union[int, str]
  • RedundantUnionInspectionUnion[int, bool]int
  • NestedUnionInspectionUnion[Union[X, Y], Z]Union[X, Y, Z]
  • EmptyUnionInspection — detect invalid Union[]

Pipe Syntax Inspections (Python 3.10+)

  • PipeSyntaxWithObjectInspectionX | objectobject
  • PipeSyntaxWithAnyInspectionX | AnyAny
  • RedundantParenthesesInPipeUnionInspection(X) | YX | Y
  • NestedPipeUnionInspection(X | Y) | ZX | Y | Z

Syntax Conversion (disabled by default)

  • ConvertUnionToModernSyntaxInspectionUnion[X, Y]X | Y
  • ConvertOptionalToModernSyntaxInspectionOptional[X]X | None
  • ConvertPipeToUnionInspectionX | YUnion[X, Y]
  • ConvertPipeNoneToOptionalInspectionX | NoneOptional[X]
  • DeprecatedTypingCollectionInspectionList[X]list[X]
  • ConvertToTypeStatementInspectionTypeAliastype statement

Advanced Inspections (disabled by default)

  • MissingOptionalInspection — detect = None without Optional
  • SimplifyCallableInspectionCallable[..., Any]Callable
  • RedundantGenericInspection — redundant Generic[T] in class
  • UnboundTypeVarInspection — TypeVar used only once
  • ProtocolMethodAnnotationInspection — Protocol methods without annotations

Backlog

Testing

  • Add test infrastructure with IntelliJ test framework
  • Write tests for all inspections and quick fixes
  • Set up CI test coverage reporting

Advanced Features

  • Handle forward references in string annotations

User Experience

  • Add settings page for inspection configuration
  • Allow choosing Python version target
  • Option to prefer Optional[X] vs X | None
  • Batch fix action for entire file/project

Documentation

  • Improve inspection descriptions with more examples
  • Add "Learn more" links to PEP documentation
  • Create plugin documentation website

Localization

  • Extract strings to resource bundles
  • Add Russian localization
  • Add Chinese localization

Tool Integration

  • Integration with mypy error messages
  • Integration with pyright suggestions
  • Support for stub files (.pyi)

IDE Features

  • Add type annotation intentions (not just inspections)
  • Quick documentation for type patterns
  • Type annotation completion suggestions

Contributing

Contributions are welcome! See GitHub Issues for current tasks.