Skip to content

Commit a95c806

Browse files
committed
Bump mypy version and add extra stub dependencies.
1 parent f3141a3 commit a95c806

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed

domdf_python_tools/paths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ def iterchildren(
803803
match = (self / match).as_posix()
804804

805805
file: _PP
806-
for file in self.iterdir(): # type: ignore
806+
for file in self.iterdir():
807807
parts = file.parts
808808
if any(d in parts for d in exclude_dirs):
809809
continue

domdf_python_tools/secrets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Secret(str):
5454
value: str #: The actual value of the secret.
5555

5656
def __new__(cls, value) -> "Secret": # noqa D102
57-
obj: Secret = super().__new__(cls, "<SECRET>") # type: ignore
57+
obj: Secret = super().__new__(cls, "<SECRET>")
5858
obj.value = str(value)
5959
return obj
6060

domdf_python_tools/typing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
if TYPE_CHECKING or domdf_python_tools.__docs: # pragma: no cover
5454
# 3rd party
55-
from pandas import DataFrame, Series # type: ignore
55+
from pandas import DataFrame, Series
5656

5757
Series.__module__ = "pandas"
5858
DataFrame.__module__ = "pandas"
@@ -217,7 +217,7 @@ class HasHead(Protocol):
217217
.. versionadded:: 0.8.0
218218
""" # noqa D400
219219

220-
def head(self: "FrameOrSeries", n: int = 5) -> "FrameOrSeries":
220+
def head(self: "HasHead", n: int = 5) -> "HasHead":
221221
"""
222222
Return the first n rows.
223223

domdf_python_tools/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
if TYPE_CHECKING or domdf_python_tools.__docs: # pragma: no cover
7878
# 3rd party
79-
from pandas import DataFrame, Series # type: ignore
79+
from pandas import DataFrame, Series
8080

8181
Series.__module__ = "pandas"
8282
DataFrame.__module__ = "pandas"
@@ -290,7 +290,7 @@ def convert_indents(text: str, tab_width: int = 4, from_: str = '\t', to: str =
290290
class _Etcetera(str):
291291

292292
def __new__(cls):
293-
return str.__new__(cls, "...") # type: ignore
293+
return str.__new__(cls, "...")
294294

295295
def __repr__(self) -> str:
296296
return str(self)

repo_helper.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@ additional_ignore:
7474
- pathtype_demo.py
7575

7676
min_coverage: 95
77+
78+
mypy_version: "0.800"

stubs.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
git+https://github.com/domdfcoding/pytest-regressions-stubs
22
git+https://github.com/domdfcoding/natsort-stubs
3+
pandas-stubs; implementation_name == "cpython" and python_version < "3.10"
4+
types-click
5+
types-pytz

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ignore_errors = True
5353
changedir = {toxinidir}
5454
extras = all
5555
deps =
56-
mypy==0.790
56+
mypy==0.800
5757
-r{toxinidir}/tests/requirements.txt
5858
-r{toxinidir}/stubs.txt
5959
pprint36

0 commit comments

Comments
 (0)