Skip to content

Commit

Permalink
simplify type declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Aug 25, 2023
1 parent e64d5f8 commit 98141a4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Tools/cases_generator/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ def names(self, value: bool | None = None) -> list[str]:
return list(dataclasses.asdict(self).keys())
return [n for n, v in dataclasses.asdict(self).items() if v == value]

def bitmap(self, ignore: tuple[str] | None = None) -> int:
def bitmap(self, ignore: tuple = ()) -> int:
flags = 0
ignore = ignore or ()
assert all(hasattr(self, name) for name in ignore)
for name in self.names():
if getattr(self, name) and name not in ignore:
Expand Down

0 comments on commit 98141a4

Please sign in to comment.