You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import typing
import attr
@attr.s(frozen=True, auto_attribs=True, kw_only=True)
class Position:
line: int
column: int
@attr.s(frozen=True, auto_attribs=True, kw_only=True)
class Node:
start: typing.Optional[Position] = None
end: typing.Optional[Position] = None
@attr.s(frozen=True, auto_attribs=True, kw_only=True)
class Operator(Node):
symbol: str
name: str
precedence: int
associativity: str # "left" or "right"
It gives following errors:
f.py:21: error: Non-default attributes not allowed after default attributes.
f.py:22: error: Non-default attributes not allowed after default attributes.
f.py:23: error: Non-default attributes not allowed after default attributes.
f.py:24: error: Non-default attributes not allowed after default attributes.
If I understand correctly, mypy doesn't consider the existence of a new kw_only=True .
The text was updated successfully, but these errors were encountered:
Copied from python-attrs/attrs#473 - issue concerns both parties...
Use mypy on following file:
It gives following errors:
If I understand correctly, mypy doesn't consider the existence of a new
kw_only=True
.The text was updated successfully, but these errors were encountered: