Pycharm is complaining about an unexpected argument to MyClass instance. Is there a way around this?
import attr
@attr.s
class _Super:
""" My Super class"""
x: str = attr.ib(validator=attr.validators.instance_of(str))
@attr.s
class MyClass(_Super):
""" My Sub class"""
y:str = attr.ib(validator=attr.validators.instance_of(str))
x = MyClass(x="a", y="b") # (x variable) Pycharm Typehint: "Unexpected argument"
This is a bug in PyCharm 2018.2
https://youtrack.jetbrains.com/issue/PY-28506
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With