gh-104504: Run mypy on cases_generator in CI (and blacken the code) (gh-108090)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Dong-hee Na 2023-08-18 22:42:45 +09:00 committed by GitHub
parent fd19509220
commit 28cab71f95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 313 additions and 194 deletions

View file

@ -32,7 +32,7 @@ class Context(NamedTuple):
end: int
owner: PLexer
def __repr__(self):
def __repr__(self) -> str:
return f"<{self.owner.filename}: {self.begin}-{self.end}>"
@ -75,7 +75,7 @@ class StackEffect(Node):
size: str = "" # Optional `[size]`
# Note: size cannot be combined with type or cond
def __repr__(self):
def __repr__(self) -> str:
items = [self.name, self.type, self.cond, self.size]
while items and items[-1] == "":
del items[-1]