diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 66eb1a7..4e91771 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 diff --git a/changelog.md b/changelog.md index c5ff2b6..7e1a4bf 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Changelog +## [0.10.0](https://github.com/dbader/pytest-mypy/milestone/18) +* Drop support for python<3.6. + ## [0.9.1](https://github.com/dbader/pytest-mypy/milestone/17) * Add support for pytest 7. diff --git a/setup.py b/setup.py index 6680643..ae12003 100644 --- a/setup.py +++ b/setup.py @@ -29,12 +29,11 @@ def read(fname): py_modules=[ os.path.splitext(os.path.basename(path))[0] for path in glob.glob("src/*.py") ], - python_requires=">=3.5", + python_requires=">=3.6", setup_requires=["setuptools-scm>=3.5"], install_requires=[ "attrs>=19.0", "filelock>=3.0", - 'pytest>=4.6,<7.0; python_version>="3.5" and python_version<"3.6"', 'pytest>=4.6; python_version>="3.6" and python_version<"3.10"', 'pytest>=6.2; python_version>="3.10"', 'mypy>=0.500; python_version<"3.8"', @@ -48,7 +47,6 @@ def read(fname): "Topic :: Software Development :: Testing", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", diff --git a/src/pytest_mypy.py b/src/pytest_mypy.py index 862b097..d067925 100644 --- a/src/pytest_mypy.py +++ b/src/pytest_mypy.py @@ -97,14 +97,14 @@ def pytest_configure_node(self, node): # xdist hook config.addinivalue_line( "markers", - "{marker}: mark tests to be checked by mypy.".format(marker=MypyItem.MARKER), + f"{MypyItem.MARKER}: mark tests to be checked by mypy.", ) if config.getoption("--mypy-ignore-missing-imports"): mypy_argv.append("--ignore-missing-imports") mypy_config_file = config.getoption("--mypy-config-file") if mypy_config_file: - mypy_argv.append("--config-file={}".format(mypy_config_file)) + mypy_argv.append(f"--config-file={mypy_config_file}") def pytest_collect_file(file_path, parent): @@ -221,11 +221,7 @@ def runtest(self): """Raise a MypyError if mypy exited with a non-zero status.""" results = MypyResults.from_session(self.session) if results.status: - raise MypyError( - "mypy exited with status {status}.".format( - status=results.status, - ), - ) + raise MypyError(f"mypy exited with status {results.status}.") @attr.s(frozen=True, kw_only=True) @@ -256,7 +252,7 @@ def from_mypy( cls, items: List[MypyFileItem], *, - opts: Optional[List[str]] = None # noqa: C816 + opts: Optional[List[str]] = None, ) -> "MypyResults": """Generate results from mypy.""" diff --git a/tox.ini b/tox.ini index 71fa95b..211ad8f 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,6 @@ minversion = 3.20 isolated_build = true envlist = - 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} 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} 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} 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 = [gh-actions] python = - 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} 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} 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} 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 = [testenv:static] deps = bandit ~= 1.7.0 - black ~= 21.6b - flake8 ~= 3.9.0 - flake8-commas ~= 2.0.0 + black ~= 22.3.0 + flake8 ~= 4.0.0 mypy >= 0.900, < 0.910 commands = black --check src setup.py tests