Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.17 KB

README.md

File metadata and controls

58 lines (36 loc) · 1.17 KB

PyAnnotations plugin

JetBrains IntelliJ Plugins JetBrains IntelliJ plugins Twitter Follow

Code Inspections with quick fixes for python annotations

https://meanmail.dev/plugin/3

Supported versions of Intellij:

All product with python — 2020.1 — 2020.3(eap)

Examples

  1. Replace Union with None with Optional
# before

def str_to_int(value: str) -> Union[int, None]:
    ...

# after quickfix

def str_to_int(value: str) -> Optional[int]:
    ...
  1. Replace Union with object with object
# before

def some_func(value: Any) -> Union[int, object]:
    ...

# after quickfix

def some_func(value: Any) -> object:
    ...
  1. Replace Union with one item with item
# before

def parse_json(value: str) -> Union[dict]:
    ...

# after quickfix

def parse_json(value: str) -> dict:
    ...