Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
pip install -r requirements.txt
- name: Type checking with mypy
run: |
mypy --config-file mypy.ini $(git ls-files '*.py' | grep -v write_tags.py)
mypy --config-file mypy.ini $(git ls-files '*.py' 'lib/*.py' | grep -v write_tags.py | grep -v 'open_print_tag/')
1 change: 1 addition & 0 deletions lib/openprinttag_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def parse(self, data: Any, identifier: str) -> Tuple[Optional[str], Optional[str
"""

opt_record = Record(default_config_file, memoryview(data))
assert opt_record.regions is not None
tag_data = opt_record.regions["main"].read()
for k, v in tag_data.items():
print(f"{k} = {v}")
Expand Down
2 changes: 1 addition & 1 deletion lib/spoolman_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def create_vendor(
"""
try:
url: str = self.url + "/api/v1/vendor"
data = {"name": name}
data: Dict[str, Any] = {"name": name}
if empty_spool_weight:
data["empty_spool_weight"] = str(empty_spool_weight)
response = requests.post(url, json=data, timeout=10)
Expand Down
18 changes: 17 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.9
python_version = 3.10
warn_return_any = False
warn_unused_configs = True
disallow_untyped_defs = False
Expand Down Expand Up @@ -32,6 +32,22 @@ ignore_missing_imports = True
[mypy-requests.*]
ignore_missing_imports = True

[mypy-cbor2.*]
ignore_missing_imports = True

[mypy-numpy.*]
ignore_missing_imports = True

[mypy-simple_parsing.*]
ignore_missing_imports = True

[mypy-pn5180_tagomatic]
ignore_missing_imports = True

# Skip type checking for external OpenPrintTag code and local imports from it
[mypy-open_print_tag.*]
ignore_errors = True

[mypy-record]
ignore_missing_imports = True

Expand Down
Loading