Skip to content

Commit 09cd097

Browse files
Merge pull request #136 from dmtucker/dev
Drop Python 3.5 support
2 parents 61e6394 + a38a2f7 commit 09cd097

File tree

5 files changed

+11
-17
lines changed

5 files changed

+11
-17
lines changed

.github/workflows/validation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ubuntu-latest
66
strategy:
77
matrix:
8-
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
8+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
99
steps:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-python@v2

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## [0.10.0](https://github.com/dbader/pytest-mypy/milestone/18)
4+
* Drop support for python<3.6.
5+
36
## [0.9.1](https://github.com/dbader/pytest-mypy/milestone/17)
47
* Add support for pytest 7.
58

setup.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ def read(fname):
2929
py_modules=[
3030
os.path.splitext(os.path.basename(path))[0] for path in glob.glob("src/*.py")
3131
],
32-
python_requires=">=3.5",
32+
python_requires=">=3.6",
3333
setup_requires=["setuptools-scm>=3.5"],
3434
install_requires=[
3535
"attrs>=19.0",
3636
"filelock>=3.0",
37-
'pytest>=4.6,<7.0; python_version>="3.5" and python_version<"3.6"',
3837
'pytest>=4.6; python_version>="3.6" and python_version<"3.10"',
3938
'pytest>=6.2; python_version>="3.10"',
4039
'mypy>=0.500; python_version<"3.8"',
@@ -48,7 +47,6 @@ def read(fname):
4847
"Topic :: Software Development :: Testing",
4948
"Programming Language :: Python",
5049
"Programming Language :: Python :: 3",
51-
"Programming Language :: Python :: 3.5",
5250
"Programming Language :: Python :: 3.6",
5351
"Programming Language :: Python :: 3.7",
5452
"Programming Language :: Python :: 3.8",

src/pytest_mypy.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ def pytest_configure_node(self, node): # xdist hook
9797

9898
config.addinivalue_line(
9999
"markers",
100-
"{marker}: mark tests to be checked by mypy.".format(marker=MypyItem.MARKER),
100+
f"{MypyItem.MARKER}: mark tests to be checked by mypy.",
101101
)
102102
if config.getoption("--mypy-ignore-missing-imports"):
103103
mypy_argv.append("--ignore-missing-imports")
104104

105105
mypy_config_file = config.getoption("--mypy-config-file")
106106
if mypy_config_file:
107-
mypy_argv.append("--config-file={}".format(mypy_config_file))
107+
mypy_argv.append(f"--config-file={mypy_config_file}")
108108

109109

110110
def pytest_collect_file(file_path, parent):
@@ -221,11 +221,7 @@ def runtest(self):
221221
"""Raise a MypyError if mypy exited with a non-zero status."""
222222
results = MypyResults.from_session(self.session)
223223
if results.status:
224-
raise MypyError(
225-
"mypy exited with status {status}.".format(
226-
status=results.status,
227-
),
228-
)
224+
raise MypyError(f"mypy exited with status {results.status}.")
229225

230226

231227
@attr.s(frozen=True, kw_only=True)
@@ -256,7 +252,7 @@ def from_mypy(
256252
cls,
257253
items: List[MypyFileItem],
258254
*,
259-
opts: Optional[List[str]] = None # noqa: C816
255+
opts: Optional[List[str]] = None,
260256
) -> "MypyResults":
261257
"""Generate results from mypy."""
262258

tox.ini

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
minversion = 3.20
44
isolated_build = true
55
envlist =
6-
py35-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
76
py36-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
87
py37-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
98
py38-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.71, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
@@ -14,7 +13,6 @@ envlist =
1413

1514
[gh-actions]
1615
python =
17-
3.5: py35-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
1816
3.6: py36-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
1917
3.7: py37-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
2018
3.8: py38-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.71, 0.7x, 0.80, 0.8x, 0.90, 0.9x}, publish, static
@@ -90,9 +88,8 @@ commands =
9088
[testenv:static]
9189
deps =
9290
bandit ~= 1.7.0
93-
black ~= 21.6b
94-
flake8 ~= 3.9.0
95-
flake8-commas ~= 2.0.0
91+
black ~= 22.3.0
92+
flake8 ~= 4.0.0
9693
mypy >= 0.900, < 0.910
9794
commands =
9895
black --check src setup.py tests

0 commit comments

Comments
 (0)