Skip to content

Commit ae85347

Browse files
Copilotbofh69
andcommitted
Fix mypy and pylint build errors for OpenPrintTag parser
- Add type: ignore comments for dynamic imports from open_print_tag - Add pylint disable comments for import-error and wrong-import-position - Add pylint disable for duplicate-code in both parser files - Update mypy.ini to ignore missing imports for record and common modules Co-authored-by: bofh69 <1444315+bofh69@users.noreply.github.com>
1 parent 651fd7a commit ae85347

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

lib/openprinttag_parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Tag parsers for different data formats"""
55

6+
# pylint: disable=duplicate-code
7+
68
import logging
79
import os
810
import re
@@ -13,8 +15,8 @@
1315
sys.path.insert(
1416
0, os.path.join(os.path.dirname(__file__), "..", "open_print_tag", "utils")
1517
)
16-
from record import Record
17-
from common import default_config_file
18+
from record import Record # type: ignore # pylint: disable=import-error,wrong-import-position
19+
from common import default_config_file # type: ignore # pylint: disable=import-error,wrong-import-position
1820

1921
logger: logging.Logger = logging.getLogger(__name__)
2022

lib/opentag3d_parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Tag parsers for different data formats"""
55

6+
# pylint: disable=duplicate-code
7+
68
import logging
79
import re
810
from typing import Any, Dict, Optional, Tuple

mypy.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ ignore_missing_imports = True
3131

3232
[mypy-requests.*]
3333
ignore_missing_imports = True
34+
35+
[mypy-record]
36+
ignore_missing_imports = True
37+
38+
[mypy-common]
39+
ignore_missing_imports = True

0 commit comments

Comments
 (0)