Skip to content

Commit 666c1b0

Browse files
Fixes project (#164)
* Updates poetry files * Adds more Python versions to CI and drop Python `3.7` * Fixes typesafety tests * Adds `Typing :: Typed` classifier * Updates `CHANGELOG.md` * Fixes PR comments
1 parent 1067325 commit 666c1b0

File tree

7 files changed

+1211
-1223
lines changed

7 files changed

+1211
-1223
lines changed

.github/workflows/test.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,22 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: [3.7, 3.8, 3.9]
10+
python-version: ['3.8', '3.9', '3.10', '3.11']
1111

1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515

1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v2
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

2121
- name: Install poetry
22-
run: |
23-
curl -sSL "https://install.python-poetry.org" | python
24-
25-
# Adding `poetry` to `$PATH`:
26-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
22+
run: curl -sSL "https://install.python-poetry.org" | python
2723

2824
- name: Set up cache
29-
uses: actions/cache@v2
25+
uses: actions/cache@v3
3026
with:
3127
path: .venv
3228
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
@@ -52,6 +48,6 @@ jobs:
5248
5349
- name: Upload coverage to Codecov
5450
if: matrix.python-version == 3.8
55-
uses: codecov/codecov-action@v1.1.1
51+
uses: codecov/codecov-action@v3
5652
with:
5753
file: ./coverage.xml

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ See (0Ver)[https://0ver.org/].
1010
### Misc
1111

1212
* Breaking: Drops Python 3.6 support
13+
* Breaking: Drops Python 3.7 support
1314

1415
## Version 0.1.0
1516

poetry.lock

+1,158-1,179
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
[build-system]
2-
requires = ["poetry>=0.12"]
3-
build-backend = "poetry.masonry.api"
4-
5-
6-
[tool.nitpick]
7-
style = "https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/nitpick-style-wemake.toml"
8-
9-
101
[tool.poetry]
112
name = "lambdas"
123
version = "0.1.0"
@@ -38,32 +29,41 @@ classifiers = [
3829
"Intended Audience :: Developers",
3930
"Operating System :: OS Independent",
4031
"Topic :: Software Development :: Libraries :: Python Modules",
41-
"Topic :: Utilities"
32+
"Topic :: Utilities",
33+
"Typing :: Typed"
4234
]
4335

4436
[tool.poetry.dependencies]
45-
python = "^3.7"
37+
python = ">=3.8.1,<4"
4638
typing-extensions = ">=4.0,<5.0"
4739

48-
[tool.poetry.dev-dependencies]
49-
mypy = "^0.982"
50-
wemake-python-styleguide = "^0.17.0"
40+
[tool.poetry.group.dev.dependencies]
41+
mypy = "^1.5.1"
42+
43+
wemake-python-styleguide = "^0.18"
5144
flake8-pytest = "^1.4"
52-
flake8-pytest-style = "^1.6.0"
53-
flake8-pyi = "^22.8"
54-
nitpick = "^0.32.0"
45+
flake8-pytest-style = "^1.7.2"
46+
flake8-pyi = "^23.6.0"
47+
nitpick = "^0.34.0"
5548

56-
safety = "^2.1"
49+
safety = "^2.3.5"
5750

58-
pytest = "^7.1"
59-
pytest-cov = "^4.0"
60-
pytest-randomly = "^3.12"
61-
pytest-mypy-plugins = "^1.10"
51+
pytest = "^7.4.2"
52+
pytest-cov = "^4.1.0"
53+
pytest-randomly = "^3.15.0"
54+
pytest-mypy-plugins = "^3.0.0"
6255

63-
sphinx = "^5.1"
64-
sphinx-autodoc-typehints = "^1.19"
65-
sphinxcontrib-mermaid = "^0.7"
56+
sphinx = "^7.1"
57+
sphinx-autodoc-typehints = "^1.24.0"
58+
sphinxcontrib-mermaid = "^0.9.2"
6659
sphinx-typlog-theme = "^0.8.0"
67-
doc8 = "^1.0.0"
68-
m2r2 = "^0.3.3"
69-
tomlkit = "^0.11.4"
60+
doc8 = "^1.1.1"
61+
m2r2 = "^0.3.3.post2"
62+
tomlkit = "^0.12.1"
63+
64+
[tool.nitpick]
65+
style = "https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/0.18.0/styles/nitpick-style-wemake.toml"
66+
67+
[build-system]
68+
requires = ["poetry-core>=1.6.0"]
69+
build-backend = "poetry.core.masonry.api"

typesafety/test_add_type.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,27 @@
33
main: |
44
from lambdas import _
55
6-
reveal_type((_ + 1)(2)) # N: Revealed type is "builtins.complex"
6+
reveal_type((_ + 1)(2)) # N: Revealed type is "Union[builtins.int, builtins.float, builtins.complex]"
77
88
9-
- case: callable_add_wrong
9+
- case: callable_add_wrong_bellow_py310
10+
skip: sys.version_info[:2] >= (3, 10)
1011
disable_cache: true
1112
main: |
1213
from lambdas import _
1314
1415
reveal_type((_ + 1)('a'))
1516
out: |
16-
main:3: note: Revealed type is "builtins.complex"
17-
main:3: error: Argument 1 to "__call__" of "_MathExpression" has incompatible type "str"; expected "Union[int, float, complex]"
17+
main:3: note: Revealed type is "Union[builtins.int, builtins.float, builtins.complex]"
18+
main:3: error: Argument 1 to "__call__" of "_MathExpression" has incompatible type "str"; expected "Union[int, float, complex]" [arg-type]
19+
20+
- case: callable_add_above_py39
21+
skip: sys.version_info[:2] <= (3, 9)
22+
disable_cache: true
23+
main: |
24+
from lambdas import _
25+
26+
reveal_type((_ + 1)('a'))
27+
out: |
28+
main:3: note: Revealed type is "Union[builtins.int, builtins.float, builtins.complex]"
29+
main:3: error: Argument 1 to "__call__" of "_MathExpression" has incompatible type "str"; expected "int | float | complex" [arg-type]

typesafety/test_getattr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
reveal_type((_.attr)(Test()))
2121
out: |
2222
main:6: note: Revealed type is "<nothing>"
23-
main:6: error: Argument 1 has incompatible type "Test"; expected "_LambdaDynamicProtocol[<nothing>]"
23+
main:6: error: Argument 1 has incompatible type "Test"; expected "_LambdaDynamicProtocol[<nothing>]" [arg-type]

typesafety/test_getitem_type.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
reveal_type(_[0]({'item': 1}))
2323
out: |
2424
main:3: note: Revealed type is "builtins.int"
25-
main:3: error: Dict entry 0 has incompatible type "str": "int"; expected "int": "int"
25+
main:3: error: Dict entry 0 has incompatible type "str": "int"; expected "int": "int" [dict-item]
2626

0 commit comments

Comments
 (0)