Skip to content

Commit 7f38c38

Browse files
committed
Bump mypy
1 parent 19adf9d commit 7f38c38

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

.github/workflows/flake8.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
if: steps.changes.outputs.code == 'true'
3636
uses: "actions/setup-python@v5"
3737
with:
38-
python-version: "3.8"
38+
python-version: "3.9"
3939

4040
- name: Install dependencies 🔧
4141
if: steps.changes.outputs.code == 'true'

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
if: steps.changes.outputs.code == 'true'
4141
uses: "actions/setup-python@v5"
4242
with:
43-
python-version: "3.8"
43+
python-version: "3.9"
4444

4545
- name: Install dependencies 🔧
4646
run: |

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ autodoc_exclude_members = [
124124
]
125125

126126
[tool.mypy]
127-
python_version = "3.8"
127+
python_version = "3.9"
128128
namespace_packages = true
129129
check_untyped_defs = true
130130
warn_unused_ignores = true

repo_helper.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ use_whey: true
1515
sphinx_html_theme: furo
1616
preserve_custom_theme: true
1717
min_coverage: 95
18+
mypy_version: 1.16
19+
python_deploy_version: 3.9
1820

1921
# Versions to run tests for
2022
python_versions:

sphinx_autofixture/__init__.py

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

5353
try: # pragma: no cover
5454
# 3rd party
55-
from _pytest.fixtures import FixtureFunctionDefinition # type: ignore[attr-defined]
55+
from _pytest.fixtures import FixtureFunctionDefinition
5656
except ImportError: # pragma: no cover
5757

5858
class FixtureFunctionDefinition: # type: ignore[no-redef]
@@ -169,7 +169,7 @@ def can_document_member(
169169
"""
170170

171171
if isinstance(member, (FunctionType, FixtureFunctionDefinition)):
172-
return is_fixture(member)[0]
172+
return is_fixture(member)[0] # type: ignore[arg-type]
173173
else: # pragma: no cover
174174
return False
175175

tests/test_directive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
path = pathlib.Path
1818
else:
1919
# 3rd party
20-
from sphinx.testing.path import path # type: ignore[misc]
20+
from sphinx.testing.path import path # type: ignore[assignment]
2121

2222
pytest_plugins = "sphinx.testing.fixtures"
2323

@@ -117,9 +117,9 @@ def test_output(
117117
def _get_alabaster_version() -> Tuple[int, int, int]:
118118
try:
119119
# 3rd party
120-
import alabaster._version as alabaster # type: ignore[import]
120+
import alabaster._version as alabaster # type: ignore[import-untyped]
121121
except ImportError:
122122
# 3rd party
123-
import alabaster # type: ignore[import]
123+
import alabaster # type: ignore[import-untyped]
124124

125125
return tuple(map(int, alabaster.__version__.split('.')))

tox.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ test =
7575
pypy38-pytest{7.4,8.3}
7676
pypy39-pytest{7.4,8.3,latest}
7777
qa = mypy, lint
78-
cov = py38-sphinx3.2, coverage
78+
cov = py39-sphinx3.2, coverage
7979

8080
[testenv:.package]
8181
setenv =
@@ -109,7 +109,7 @@ commands =
109109
check-wheel-contents dist/
110110

111111
[testenv:lint]
112-
basepython = python3.8
112+
basepython = python3.9
113113
changedir = {toxinidir}
114114
ignore_errors = True
115115
skip_install = True
@@ -139,33 +139,33 @@ deps =
139139
commands = python3 -m flake8_rst_docstrings_sphinx sphinx_autofixture tests --allow-toolbox {posargs}
140140

141141
[testenv:perflint]
142-
basepython = python3.8
142+
basepython = python3.9
143143
changedir = {toxinidir}
144144
ignore_errors = True
145145
skip_install = True
146146
deps = perflint
147147
commands = python3 -m perflint sphinx_autofixture {posargs}
148148

149149
[testenv:mypy]
150-
basepython = python3.8
150+
basepython = python3.9
151151
ignore_errors = True
152152
changedir = {toxinidir}
153153
deps =
154-
mypy==0.971
154+
mypy==1.16
155155
-r{toxinidir}/tests/requirements.txt
156156
-r{toxinidir}/stubs.txt
157157
commands = mypy sphinx_autofixture tests {posargs}
158158

159159
[testenv:pyup]
160-
basepython = python3.8
160+
basepython = python3.9
161161
skip_install = True
162162
ignore_errors = True
163163
changedir = {toxinidir}
164164
deps = pyupgrade-directories
165165
commands = pyup_dirs sphinx_autofixture tests --py36-plus --recursive
166166

167167
[testenv:coverage]
168-
basepython = python3.8
168+
basepython = python3.9
169169
skip_install = True
170170
ignore_errors = True
171171
whitelist_externals = /bin/bash

0 commit comments

Comments
 (0)