Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
muppet-strings
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hugo Hörnquist
muppet-strings
Commits
b8ccdca6
Commit
b8ccdca6
authored
1 year ago
by
Hugo Hörnquist
Browse files
Options
Downloads
Patches
Plain Diff
Fix types in main.py.
parent
7a4a7800
No related branches found
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
main.py
+131
-120
131 additions, 120 deletions
main.py
mypy.ini
+10
-0
10 additions, 0 deletions
mypy.ini
reflow.py
+2
-2
2 additions, 2 deletions
reflow.py
with
144 additions
and
123 deletions
Makefile
+
1
−
1
View file @
b8ccdca6
...
...
@@ -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.
Click to expand it.
main.py
+
131
−
120
View file @
b8ccdca6
This diff is collapsed.
Click to expand it.
mypy.ini
0 → 100644
+
10
−
0
View file @
b8ccdca6
[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
This diff is collapsed.
Click to expand it.
reflow.py
+
2
−
2
View file @
b8ccdca6
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment