mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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:
parent
fd19509220
commit
28cab71f95
11 changed files with 313 additions and 194 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue