Skip to content

Commit 2717d1f

Browse files
Add mypy-plugin extra dependency (#1605)
* Add mypy-plugin extra dependency use `pip install classes[mypy-plugin]` for installin additional dependencies required by the mypy-plugin. Add mypy-plugin extra dependency use `pip install classes[mypy-plugin]` for installing additional dependencies required by the mypy-plugin. * Remove mypy from dev deps --------- Co-authored-by: sobolevn <mail@sobolevn.me>
1 parent c4643b0 commit 2717d1f

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Install dependencies
5151
run: |
5252
poetry config virtualenvs.in-project true
53-
poetry install
53+
poetry install --extras=compatible-mypy
5454
5555
poetry run pip install -U pip
5656

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ You are also required to [configure](https://returns.readthedocs.io/en/latest/pa
4040
`mypy` correctly and install our plugin
4141
to fix [this existing issue](https://github.com/python/mypy/issues/3157):
4242

43+
```bash
44+
pip install returns[compatible-mypy]
45+
```
46+
and
47+
4348
```ini
4449
# In setup.cfg or mypy.ini:
4550
[mypy]

poetry.lock

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ _ = "returns.contrib.hypothesis._entrypoint"
4848
python = "^3.7"
4949

5050
typing-extensions = ">=4.0,<5.0"
51+
mypy = { version = "^1.4.0", optional = true }
5152

5253
[tool.poetry.dev-dependencies]
5354
anyio = "^3.7"
5455
trio = "^0.22"
5556
attrs = "^23.1"
5657
httpx = "^0.24"
5758

58-
mypy = "^1.4"
5959
wemake-python-styleguide = "^0.17"
6060
flake8-pytest-style = "^1.6"
6161
flake8-pyi = "^23.4"
@@ -81,6 +81,9 @@ doc8 = "^1.0"
8181
m2r2 = "^0.3"
8282
tomlkit = "^0.11"
8383

84+
[tool.poetry.extras]
85+
compatible-mypy = ["mypy"]
86+
8487

8588
[build-system]
8689
requires = ["poetry-core>=1.5.0"]

0 commit comments

Comments
 (0)