8000 Add python 3.10 to CI (#279) · python-kasa/python-kasa@a817d9c · GitHub
[go: up one dir, main page]

Skip to content

Commit a817d9c

Browse files
authored
Add python 3.10 to CI (#279)
* Add python 3.10 to CI * Require pytest >=6.2.5 Required for running on python 3.10 (pytest-dev/pytest#8540) * Update lockfile * Update pre-commit hooks
1 parent d2efaf5 commit a817d9c

File tree

5 files changed

+47
-59
lines changed

5 files changed

+47
-59
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
python-version: ["3.9"]
18+
python-version: ["3.10"]
1919

2020
steps:
2121
- uses: "actions/checkout@v2"
@@ -61,7 +61,7 @@ jobs:
6161

6262
strategy:
6363
matrix:
64-
python-version: ["3.7", "3.8", "3.9", "pypy-3.7"]
64+
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
6565
os: [ubuntu-latest, macos-latest, windows-latest]
6666
# exclude pypy on windows, as the poetry install seems to be very flaky:
6767
# PermissionError(13, 'The process cannot access the file because it is being used by another process'))

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ repos:
1010
- id: check-ast
1111

1212
- repo: https://github.com/asottile/pyupgrade
13-
rev: v2.27.0
13+
rev: v2.29.1
1414
hooks:
1515
- id: pyupgrade
16-
args: ['--py36-plus']
16+
args: ['--py37-plus']
1717

1818
- repo: https://github.com/python/black
19-
rev: 21.9b0
19+
rev: 21.12b0
2020
hooks:
2121
- id: black
2222

@@ -33,7 +33,7 @@ repos:
3333
additional_dependencies: [toml]
3434

3535
- repo: https://github.com/pre-commit/mirrors-mypy
36-
rev: v0.910
36+
rev: v0.920
3737
hooks:
3838
- id: mypy
3939
additional_dependencies: [types-click]

kasa/smartstrip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ async def erase_emeter_stats(self):
205205
@requires_update
206206
def emeter_this_month(self) -> Optional[float]:
207207
"""Return this month's energy consumption in kWh."""
208-
return sum([plug.emeter_this_month for plug in self.children])
208+
return sum(plug.emeter_this_month for plug in self.children)
209209

210210
@property # type: ignore
211211
@requires_update
212212
def emeter_today(self) -> Optional[float]:
213213
"""Return this month's energy consumption in kWh."""
214-
return sum([plug.emeter_today for plug in self.children])
214+
return sum(plug.emeter_today for plug in self.children)
215215

216216
@property # type: ignore
217217
@requires_update

poetry.lock

-50Lines changed: 38 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sphinx_rtd_theme = { version = "^0", optional = true }
2727
sphinxcontrib-programoutput = { version = "^0", optional = true }
2828

2929
[tool.poetry.dev-dependencies]
30-
pytest = "^5"
30+
pytest = ">=6.2.5"
3131
pytest-cov = "^2"
3232
pytest-asyncio = "^0"
3333
pytest-sugar = "*"

0 commit comments

Comments
 (0)
0