8000 Update mypy and linter ignores. · domdfcoding/domdf_python_tools@3e565be · GitHub
[go: up one dir, main page]

Skip to content

Commit 3e565be

Browse files
committed
Update mypy and linter ignores.
1 parent 0be5b57 commit 3e565be

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

domdf_python_tools/compat/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@
103103
"PYPY39_PLUS",
104104
]
105105

106-
if sys.version_info[:2] < (3, 7) or domdf_python_tools.__docs or TYPE_CHECKING: # pragma: no cover (py37+)
106+
if TYPE_CHECKING: # pragma: no cover
107+
# stdlib
108+
from contextlib import nullcontext
109+
110+
elif sys.version_info[:2] < (3, 7) or domdf_python_tools.__docs: # pragma: no cover (py37+)
107111

108112
_T = TypeVar("_T")
109113

domdf_python_tools/stringlist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ def size(self) -> int:
7979
def size(self, size: int) -> None:
8080
self._size = int(size)
8181

82-
@property # noqa: A003 # pylint: disable=redefined-builtin
82+
@property
8383
def type(self) -> str:
8484
"""
8585
The indent character.
8686
"""
8787

8888
return self._type
8989

90-
@type.setter # noqa: A003 # pylint: disable=redefined-builtin
90+
@type.setter
9191
def type(self, type: str) -> None: # noqa: A002 # pylint: disable=redefined-builtin
9292
if not str(type):
9393
raise ValueError("'type' cannot an empty string.")

tests/test_dates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def test_utc_offset_no_pytz():
198198
# ):
199199
#
200200
# # this package
201-
# from domdf_python_tools.dates import get_utc_offset # noqa: F401
201+
# from domdf_python_tools.dates import get_utc_offset
202202

203203

204204
@pytest.mark.parametrize("month_idx, month", enumerate(dates.month_full_names))

0 commit comments

Comments
 (0)
0