WhiteMemory99 / Intellij-Python-Inlay-Params

A PyCharm plugin that implements inlay parameter and type annotation hints for Python.
https://plugins.jetbrains.com/plugin/19538
MIT License
36 stars 6 forks source link

Ignore union type hints if expression is BinaryExpression or ConditionalExpression and one of the part of expression is empty LiteralExpression #9

Closed divaltor closed 2 years ago

divaltor commented 2 years ago

When we have code like

def __init__(self, value: List[str] = None):
     value = value or []

In this case we get type hint List[str] | list | None which is not valid expression

divaltor commented 2 years ago

It's hard to implement, because it's literally a bug from JetBrains IDE itself and I don't want to fix that instead of their developers