summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2023-07-06 11:11:03 +1000
committerSergey Udaltsov <sergey.udaltsov@gmail.com>2023-10-28 11:53:20 +0000
commita94a76f7a8ac0c6644071d92e7325bab1e927bc9 (patch)
tree5f1955130879a82bdbf8cb763fe6d2d3c1cd617a
parent336b9bcf8cc6e84f67aaa1d25193f8db8670ef33 (diff)
scripts/symbols-tree: remove an unused argument and add type annotations
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rwxr-xr-xscripts/symbols-tree.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/symbols-tree.py b/scripts/symbols-tree.py
index d345480b..cb02738d 100755
--- a/scripts/symbols-tree.py
+++ b/scripts/symbols-tree.py
@@ -65,7 +65,7 @@ class XkbLoader:
def load_symbols(cls, file):
return cls.instance().load_symbols_file(file)
- def load_symbols_file(self, file):
+ def load_symbols_file(self, file) -> list[XkbSymbols]:
file = self.xkb_basedir / file
try:
return self.loaded[file]
@@ -132,7 +132,7 @@ def lit(string):
return Literal(string).suppress()
-def print_section(s, filter_section=None, indent=0):
+def print_section(s: XkbSymbols, filter_section: str | None = None, indent=0):
if filter_section and s.name != filter_section:
return
@@ -157,7 +157,7 @@ def print_section(s, filter_section=None, indent=0):
print_section(include_section, filter_section=variant, indent=indent + 4)
-def list_sections(sections, filter_section=None, indent=0):
+def list_sections(sections: list[XkbSymbols], filter_section: str | None = None):
for section in sections:
print_section(section, filter_section)