Skip to content
Snippets Groups Projects
Commit b8ccdca6 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Fix types in main.py.

parent 7a4a7800
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ $(CACHE_DIR)/output.json:
$(CACHE_DIR)/%.json:
cd $< && puppet strings generate --format json --out $(CURDIR)/$@
index.html: $(CACHE_DIR)/output.json
index.html: $(CACHE_DIR)/output.json *.py
python3 main.py $< > $@
check:
......
This diff is collapsed.
mypy.ini 0 → 100644
[mypy]
# Disabled since `match` breaks it.
disable_error_code = used-before-def
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
warn_return_any = True
# warn_unrearchable = True
......@@ -28,7 +28,7 @@ def tagged_list_to_dict(lst: list[Any]) -> dict[Any, Any]:
for i in range(0, len(lst), 2)}
def traverse(tree):
def traverse(tree: Any) -> Any:
"""
Reflow a puppet parse output tree.
......@@ -61,7 +61,7 @@ def traverse(tree):
return tree
def __main():
def __main() -> None:
import json
import sys
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment