Skip to content

Commit

Permalink
Update mypy and linter ignores.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Dec 10, 2023
1 parent 0be5b57 commit 3e565be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion domdf_python_tools/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@
"PYPY39_PLUS",
]

if sys.version_info[:2] < (3, 7) or domdf_python_tools.__docs or TYPE_CHECKING: # pragma: no cover (py37+)
if TYPE_CHECKING: # pragma: no cover
# stdlib
from contextlib import nullcontext

elif sys.version_info[:2] < (3, 7) or domdf_python_tools.__docs: # pragma: no cover (py37+)

_T = TypeVar("_T")

Expand Down
4 changes: 2 additions & 2 deletions domdf_python_tools/stringlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ def size(self) -> int:
def size(self, size: int) -> None:
self._size = int(size)

@property # noqa: A003 # pylint: disable=redefined-builtin
@property
def type(self) -> str:
"""
The indent character.
"""

return self._type

@type.setter # noqa: A003 # pylint: disable=redefined-builtin
@type.setter
def type(self, type: str) -> None: # noqa: A002 # pylint: disable=redefined-builtin
if not str(type):
raise ValueError("'type' cannot an empty string.")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def test_utc_offset_no_pytz():
# ):
#
# # this package
# from domdf_python_tools.dates import get_utc_offset # noqa: F401
# from domdf_python_tools.dates import get_utc_offset


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

0 comments on commit 3e565be

Please sign in to comment.