Skip to content

Commit 2355721

Browse files
authored
Merge pull request #754 from plugwise/updates
Maintenance chores
2 parents 966ba34 + db71ec6 commit 2355721

File tree

12 files changed

+223
-252
lines changed

12 files changed

+223
-252
lines changed

.github/workflows/verify.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Latest commit
55

66
env:
7-
CACHE_VERSION: 12
7+
CACHE_VERSION: 13
88
DEFAULT_PYTHON: "3.13"
99
PRE_COMMIT_HOME: ~/.cache/pre-commit
1010

@@ -173,7 +173,7 @@ jobs:
173173
needs: commitcheck
174174
strategy:
175175
matrix:
176-
python-version: ["3.13", "3.12"]
176+
python-version: ["3.13"]
177177
steps:
178178
- name: Check out committed code
179179
uses: actions/checkout@v4
@@ -213,7 +213,7 @@ jobs:
213213
needs: prepare-test-cache
214214
strategy:
215215
matrix:
216-
python-version: ["3.13", "3.12"]
216+
python-version: ["3.13"]
217217

218218
steps:
219219
- name: Check out committed code

.pre-commit-config.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@ repos:
2929
- id: pyupgrade
3030
name: "Check Py upgrade"
3131
args: [--py311-plus]
32-
# Moved codespell configuration to setup.cfg as per 'all-files' issues not reading args
3332
- repo: https://github.com/codespell-project/codespell
3433
rev: v2.4.1
3534
hooks:
3635
- id: codespell
37-
name: "Check spelling"
36+
name: "Check Code Spelling"
37+
args:
38+
- --ignore-words-list=aiport,astroid,checkin,currenty,hass,iif,incomfort,lookin,nam,NotIn
39+
- --skip="./.*,*.csv,*.json,*.ambr"
40+
- --quiet-level=2
3841
exclude_types: [csv, json]
42+
exclude: ^userdata/|^fixtures/
3943
- repo: https://github.com/PyCQA/bandit
4044
rev: 1.8.3
4145
hooks:
@@ -51,6 +55,13 @@ repos:
5155
hooks:
5256
- id: yamllint
5357
name: "YAML linting"
58+
- repo: https://github.com/shellcheck-py/shellcheck-py
59+
rev: v0.10.0.1
60+
hooks:
61+
- id: shellcheck
62+
name: "Shell checking"
63+
args:
64+
- --external-sources
5465
- repo: https://github.com/cdce8p/python-typing-update
5566
rev: v0.7.2
5667
hooks:

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## v1.7.5
4+
5+
- Maintenance chores
6+
- Deprecating python 3.12
7+
8+
## v1.7.4
9+
10+
- Maintenance chores
11+
312
## v1.7.3
413

514
- Improve readability of xml-data in POST/PUT requests via [#707](https://github.com/plugwise/python-plugwise/pull/707), [#708](https://github.com/plugwise/python-plugwise/pull/708) and [#715](https://github.com/plugwise/python-plugwise/pull/715)

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "plugwise"
7-
version = "1.7.4"
7+
version = "1.7.5"
88
license = "MIT"
99
description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
1010
readme = "README.md"
@@ -13,7 +13,6 @@ classifiers = [
1313
"Development Status :: 5 - Production/Stable",
1414
"Intended Audience :: Developers",
1515
"Operating System :: OS Independent",
16-
"Programming Language :: Python :: 3.12",
1716
"Programming Language :: Python :: 3.13",
1817
"Topic :: Home Automation",
1918
]
@@ -24,7 +23,7 @@ maintainers = [
2423
{ name = "bouwew"},
2524
{ name = "CoMPaTech" }
2625
]
27-
requires-python = ">=3.12.0"
26+
requires-python = ">=3.13"
2827
dependencies = [
2928
"aiohttp",
3029
"defusedxml",
@@ -52,7 +51,7 @@ include = ["plugwise*"]
5251
# 20241208: W0201 / attribute-defined-outside-init
5352
# 20241208: R1702 / too-many-nested-blocks # too many nested blocks in test_init 8/5
5453
# 20241208: R6102 / consider-using-tuple
55-
# 20241208: Recommended disabling => "implicit-str-concat", # ISC001 - 2 occurances!
54+
# 20241208: Recommended disabling => "implicit-str-concat", # ISC001 - 2 occurrences!
5655
##
5756

5857
[tool.pylint.MAIN]
@@ -466,7 +465,6 @@ lint.select = [
466465
"S317", # suspicious-xml-sax-usage
467466
"S318", # suspicious-xml-mini-dom-usage
468467
"S319", # suspicious-xml-pull-dom-usage
469-
"S320", # suspicious-xmle-tree-usage
470468
"S601", # paramiko-call
471469
"S602", # subprocess-popen-with-shell-equals-true
472470
"S604", # call-with-shell-equals-true

scripts/complexity.sh

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@ set -eu
33

44
my_path=$(git rev-parse --show-toplevel)
55

6-
# shellcheck disable=SC1091
7-
source "${my_path}/scripts/python-venv.sh"
8-
9-
# shellcheck disable=SC2154
10-
if [ -f "${my_venv}/bin/activate" ]; then
11-
# shellcheck disable=SC1091
12-
. "${my_venv}/bin/activate"
13-
echo "-----------------------------"
14-
echo "Running cyclomatic complexity"
15-
echo "-----------------------------"
16-
PYTHONPATH=$(pwd) radon cc plugwise/ tests/ -s -nc --no-assert
6+
if [ -n "${VIRTUAL_ENV-}" ] && [ -f "${VIRTUAL_ENV}/bin/activate" ]; then
7+
# shellcheck disable=SC1091 # ingesting virtualenv
8+
. "${VIRTUAL_ENV}/bin/activate"
179
else
18-
echo "Virtualenv available, bailing out"
19-
exit 2
10+
# other common virtualenvs
11+
my_path=$(git rev-parse --show-toplevel)
12+
13+
for venv in venv .venv .; do
14+
if [ -f "${my_path}/${venv}/bin/activate" ]; then
15+
# shellcheck disable=SC1090 # ingesting virtualenv
16+
. "${my_path}/${venv}/bin/activate"
17+
break
18+
fi
19+
done
2020
fi
21+
22+
echo "-----------------------------"
23+
echo "Running cyclomatic complexity"
24+
echo "-----------------------------"
25+
PYTHONPATH=$(pwd) radon cc plugwise/ tests/ -s -nc --no-assert

0 commit comments

Comments
 (0)