Skip to content

Commit

Permalink
Version 1.10.0 release (typeddjango#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Aug 15, 2022
1 parent e3ce0bf commit 19de6e5
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -13,8 +13,8 @@ jobs:

strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
pytest-version: ["~=6.2", "==7.0.0rc1"] # TODO: enable `~=7.0`
python-version: ["3.7", "3.8", "3.9", "3.10"]
pytest-version: ["~=6.2", "~=7.1"]

steps:
- uses: actions/checkout@v3
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,15 @@
# Version history


## Version 1.10.0

### Features

- Changes how `mypy>=0.970` handles `MYPYPATH`
- Bumps minimal `mypy` version to `mypy>=0.970`
- Drops `python3.6` support


## Version 1.9.3

### Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -53,7 +53,7 @@ You can also specify `PYTHONPATH`, `MYPYPATH`, or any other environment variable
instance: Pair
reveal_type(instance) # N: Revealed type is 'pair.Pair'
env:
- MYPYPATH=./pytest_mypy_plugins/tests/fixtures
- MYPYPATH=../fixtures
```


Expand Down
2 changes: 0 additions & 2 deletions pytest_mypy_plugins/item.py
Expand Up @@ -384,8 +384,6 @@ def _collect_mypy_path(self, rootdir: Optional[Path]) -> None:
existing_mypy_path = os.environ.get("MYPYPATH")
if existing_mypy_path:
mypy_path_parts.append(existing_mypy_path)
if self.base_ini_fpath:
mypy_path_parts.append(os.path.dirname(self.base_ini_fpath))
mypy_path_key = self.environment_variables.get("MYPYPATH")
if mypy_path_key:
mypy_path_parts.append(maybe_to_abspath(mypy_path_key, rootdir))
Expand Down
2 changes: 0 additions & 2 deletions pytest_mypy_plugins/tests/fixtures/pair.py

This file was deleted.

28 changes: 6 additions & 22 deletions pytest_mypy_plugins/tests/test-paths-from-env.yml
@@ -1,29 +1,13 @@
- case: mypy_path_from_env
main: |
from pair import Pair
a: Pair
reveal_type(a) # N: Revealed type is "pair.Pair"
env:
- MYPYPATH=./pytest_mypy_plugins/tests/fixtures


- case: mypy_path_from_env_with_error
main: |
from pair import Missing
out: |
main:1: error: Module "pair" has no attribute "Missing"
env:
- MYPYPATH=./pytest_mypy_plugins/tests/fixtures


- case: add_mypypath_env_var_to_package_search
main: |
import extra_module
extra_module.extra_fn()
extra_module.missing() # E: Module has no attribute "missing"
env:
- MYPYPATH=./extras
- MYPYPATH=../extras
files:
- path: extras/extra_module.py
- path: ../extras/extra_module.py
content: |
def extra_fn():
def extra_fn() -> None:
pass
10 changes: 6 additions & 4 deletions setup.py
Expand Up @@ -5,7 +5,7 @@

dependencies = [
"pytest>=6.0.0",
"mypy>=0.900",
"mypy>=0.970",
"decorator",
"pyyaml",
"chevron",
Expand All @@ -15,24 +15,26 @@

setup(
name="pytest-mypy-plugins",
version="1.9.3",
version="1.10.0",
description="pytest plugin for writing tests for mypy plugins",
long_description=readme,
long_description_content_type="text/markdown",
license="MIT",
url="https://github.com/TypedDjango/pytest-mypy-plugins",
author="Maksim Kurnikov",
author_email="maxim.kurnikov@gmail.com",
maintainer="Nikita Sobolev",
maintainer_email="mail@sobolevn.me",
packages=["pytest_mypy_plugins"],
# the following makes a plugin available to pytest
entry_points={"pytest11": ["pytest-mypy-plugins = pytest_mypy_plugins.collect"]},
install_requires=dependencies,
python_requires=">=3.6",
python_requires=">=3.7",
package_data={
"pytest_mypy_plugins": ["py.typed"],
},
classifiers=[
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
Expand Down

0 comments on commit 19de6e5

Please sign in to comment.