Skip to content

Commit fc60a34

Browse files
committed
Bump mypy
1 parent db91565 commit fc60a34

File tree

7 files changed

+16
-14
lines changed

7 files changed

+16
-14
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: |

astatine/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def get_docstring_lineno(node: Union[ast.FunctionDef, ast.ClassDef, ast.Module])
172172
if not (node.body and isinstance(node.body[0], Expr)): # pragma: no cover
173173
return None
174174

175-
body = node.body[0].value # type: ignore[attr-defined]
175+
body = node.body[0].value
176176

177177
if isinstance(body, Constant) and isinstance(body.value, str): # pragma: no cover (<py38)
178178
return body.lineno

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ autodoc_exclude_members = [
119119
]
120120

121121
[tool.mypy]
122-
python_version = "3.8"
122+
python_version = "3.9"
123123
namespace_packages = true
124124
check_untyped_defs = true
125125
warn_unused_ignores = true

repo_helper.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ min_coverage: 100
1616
docs_fail_on_warning: true
1717
sphinx_html_theme: furo
1818
standalone_contrib_guide: true
19+
mypy_version: 1.16
20+
python_deploy_version: 3.9
1921

2022
conda_channels:
2123
- conda-forge

tests/test_astatine.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ def test_mark_text_ranges(source: str, advanced_data_regression: AdvancedDataReg
208208

209209
for child in ast.walk(tree):
210210
if hasattr(child, "last_token"):
211-
assert child.end_lineno
212-
assert child.end_col_offset is not None
211+
assert child.end_lineno # type: ignore[attr-defined]
212+
assert child.end_col_offset is not None # type: ignore[attr-defined]
213213

214214
if hasattr(child, "lineno"):
215215
assert child.lineno
216-
assert child.col_offset is not None
216+
assert child.col_offset is not None # type: ignore[attr-defined]
217217

218218
# TODO: check the output
219219

tox.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ requires =
4646
[envlists]
4747
test = py37, py38, py39, py310, py311, py312, py313, pypy37, pypy38, pypy39
4848
qa = mypy, lint
49-
cov = py38, coverage
49+
cov = py39, coverage
5050

5151
[testenv]
5252
setenv =
@@ -103,7 +103,7 @@ commands =
103103
check-wheel-contents dist/
104104

105105
[testenv:lint]
106-
basepython = python3.8
106+
basepython = python3.9
107107
changedir = {toxinidir}
108108
ignore_errors = True
109109
skip_install = True
@@ -133,33 +133,33 @@ deps =
133133
commands = python3 -m flake8_rst_docstrings_sphinx astatine tests --allow-toolbox {posargs}
134134

135135
[testenv:perflint]
136-
basepython = python3.8
136+
basepython = python3.9
137137
changedir = {toxinidir}
138138
ignore_errors = True
139139
skip_install = True
140140
deps = perflint
141141
commands = python3 -m perflint astatine {posargs}
142142

143143
[testenv:mypy]
144-
basepython = python3.8
144+
basepython = python3.9
145145
ignore_errors = True
146146
changedir = {toxinidir}
147147
deps =
148-
mypy==0.971
148+
mypy==1.16
149149
-r{toxinidir}/tests/requirements.txt
150150
-r{toxinidir}/stubs.txt
151151
commands = mypy astatine tests {posargs}
152152

153153
[testenv:pyup]
154-
basepython = python3.8
154+
basepython = python3.9
155155
skip_install = True
156156
ignore_errors = True
157157
changedir = {toxinidir}
158158
deps = pyupgrade-directories
159159
commands = pyup_dirs astatine tests --py36-plus --recursive
160160

161161
[testenv:coverage]
162-
basepython = python3.8
162+
basepython = python3.9
163163
skip_install = True
164164
ignore_errors = True
165165
whitelist_externals = /bin/bash

0 commit comments

Comments
 (0)