Use attr.s(auto_attribs=True) in more places

It's nicer to read without the attr.ib noise.
This commit is contained in:
Ran Benita
2021-10-04 18:32:05 +03:00
parent dced00e60f
commit e5468681b0
13 changed files with 103 additions and 109 deletions

View File

@@ -47,11 +47,11 @@ class TokenType(enum.Enum):
EOF = "end of input"
@attr.s(frozen=True, slots=True)
@attr.s(frozen=True, slots=True, auto_attribs=True)
class Token:
type = attr.ib(type=TokenType)
value = attr.ib(type=str)
pos = attr.ib(type=int)
type: TokenType
value: str
pos: int
class ParseError(Exception):