Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
python-version: ["3.9"]
python-version: ["3.10"]

steps:
- uses: "actions/checkout@v2"
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "pypy-3.7"]
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
os: [ubuntu-latest, macos-latest, windows-latest]
# exclude pypy on windows, as the poetry install seems to be very flaky:
# PermissionError(13, 'The process cannot access the file because it is being used by another process'))
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ repos:
- id: check-ast

- repo: https://github.com/asottile/pyupgrade
rev: v2.27.0
rev: v2.29.1
hooks:
- id: pyupgrade
args: ['--py36-plus']
args: ['--py37-plus']

- repo: https://github.com/python/black
rev: 21.9b0
rev: 21.12b0
hooks:
- id: black

Expand All @@ -33,7 +33,7 @@ repos:
additional_dependencies: [toml]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
rev: v0.920
hooks:
- id: mypy
additional_dependencies: [types-click]
4 changes: 2 additions & 2 deletions kasa/smartstrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ async def erase_emeter_stats(self):
@requires_update
def emeter_this_month(self) -> Optional[float]:
"""Return this month's energy consumption in kWh."""
return sum([plug.emeter_this_month for plug in self.children])
return sum(plug.emeter_this_month for plug in self.children)

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

@property # type: ignore
@requires_update
Expand Down
88 changes: 38 additions & 50 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sphinx_rtd_theme = { version = "^0", optional = true }
sphinxcontrib-programoutput = { version = "^0", optional = true }

[tool.poetry.dev-dependencies]
pytest = "^5"
pytest = ">=6.2.5"
pytest-cov = "^2"
pytest-asyncio = "^0"
pytest-sugar = "*"
Expand Down