Skip to content

Commit b73cdf2

Browse files
committed
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.
1 parent 6f925f7 commit b73cdf2

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ Smart, pythonic, ad-hoc, typed polymorphism for Python.
3232
pip install classes
3333
```
3434

35-
You also need to [configure](https://classes.readthedocs.io/en/latest/pages/container.html#type-safety)
35+
You may also need to [configure](https://classes.readthedocs.io/en/latest/pages/container.html#type-safety)
3636
`mypy` correctly and install our plugin:
3737

38+
```bash
39+
pip install classes[compatible-mypy]
40+
```
41+
and
42+
3843
```ini
3944
# In setup.cfg or mypy.ini:
4045
[mypy]

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ classifiers = [
4646
[tool.poetry.dependencies]
4747
python = "^3.7"
4848
typing_extensions = ">=3.10,<5.0"
49+
mypy = { version = "^1.2", optional = true }
4950

5051
[tool.poetry.dev-dependencies]
5152
mypy = "^0.942"
@@ -71,3 +72,7 @@ tomlkit = "^0.11"
7172
codespell = "^2.2"
7273

7374
phantom-types = "^1.0"
75+
76+
[tool.poetry.extras]
77+
compatible-mypy = ["mypy"]
78+

0 commit comments

Comments
 (0)