Skip to content

Release 3.2.0 #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
pytest-version: ["~=7.2", "~=8.1"]
# TODO: remove after several new versions of mypy
mypy-version: ["~=1.7", "~=1.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
pytest-version: ["~=7.2", "~=8.3"]

steps:
- uses: actions/checkout@v4
Expand All @@ -38,8 +36,6 @@ jobs:
pip install -e .
# Force correct `pytest` version for different envs:
pip install -U "pytest${{ matrix.pytest-version }}"
# Force correct `mypy` version:
pip install -U "mypy${{ matrix.mypy-version }}"
- name: Run tests
run: pytest

Expand All @@ -59,5 +55,5 @@ jobs:
- name: Run linters
run: |
mypy .
black --check pytest_mypy_plugins setup.py
black --check .
isort --check --diff .
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Version history


## 3.2.0

### Features

- Drops `python3.8` support
- Adds official `python3.13` support

### Bugfixes

- Fixes regex for colon output `:`, #155
- Fixes internal error with `TraceLastReprEntry`, #154


## 3.1.2

### Bugfixes
Expand Down
12 changes: 2 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
[tool.mypy]
strict = true
ignore_missing_imports = true
strict_optional = true
no_implicit_optional = true
disallow_any_generics = true
disallow_untyped_defs = true
strict_equality = true
warn_unreachable = true
warn_no_return = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true

[tool.pytest.ini_options]
python_files = "test_*.py"
addopts = "-s --mypy-extension-hook pytest_mypy_plugins.tests.reveal_type_hook.hook"

[tool.black]
line-length = 120
target-version = ["py38"]
target-version = ["py39"]

[tool.isort]
include_trailing_comma = true
Expand Down
2 changes: 1 addition & 1 deletion pytest_mypy_plugins/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def collect(self) -> Iterator["YamlTestItem"]:
)

def _eval_skip(self, skip_if: str) -> bool:
return eval(skip_if, {"sys": sys, "os": os, "pytest": pytest, "platform": platform})
return bool(eval(skip_if, {"sys": sys, "os": os, "pytest": pytest, "platform": platform}))


def pytest_collect_file(file_path: pathlib.Path, parent: Node) -> Optional[YamlTestFile]:
Expand Down
2 changes: 1 addition & 1 deletion pytest_mypy_plugins/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def matches(self, actual: str) -> bool:
)
+ self.message
)
return regex.match(pattern, actual)
return bool(regex.match(pattern, actual))
else:
return str(self) == actual

Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ isort
types-decorator
types-PyYAML
types-setuptools
types-regex
mypy==1.13
-e .
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name="pytest-mypy-plugins",
version="3.1.2",
version="3.2.0",
description="pytest plugin for writing tests for mypy plugins",
long_description=readme,
long_description_content_type="text/markdown",
Expand All @@ -31,19 +31,19 @@
# the following makes a plugin available to pytest
entry_points={"pytest11": ["pytest-mypy-plugins = pytest_mypy_plugins.collect"]},
install_requires=dependencies,
python_requires=">=3.8",
python_requires=">=3.9",
package_data={
"pytest_mypy_plugins": ["py.typed", "schema.json"],
},
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
],
)
Loading