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
6 changes: 3 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Latest commit

env:
CACHE_VERSION: 12
CACHE_VERSION: 13
DEFAULT_PYTHON: "3.13"
PRE_COMMIT_HOME: ~/.cache/pre-commit

Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
needs: commitcheck
strategy:
matrix:
python-version: ["3.13", "3.12"]
python-version: ["3.13"]
steps:
- name: Check out committed code
uses: actions/checkout@v4
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
needs: prepare-test-cache
strategy:
matrix:
python-version: ["3.13", "3.12"]
python-version: ["3.13"]

steps:
- name: Check out committed code
Expand Down
15 changes: 13 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ repos:
- id: pyupgrade
name: "Check Py upgrade"
args: [--py311-plus]
# Moved codespell configuration to setup.cfg as per 'all-files' issues not reading args
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
name: "Check spelling"
name: "Check Code Spelling"
args:
- --ignore-words-list=aiport,astroid,checkin,currenty,hass,iif,incomfort,lookin,nam,NotIn
- --skip="./.*,*.csv,*.json,*.ambr"
- --quiet-level=2
exclude_types: [csv, json]
exclude: ^userdata/|^fixtures/
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
Expand All @@ -51,6 +55,13 @@ repos:
hooks:
- id: yamllint
name: "YAML linting"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
name: "Shell checking"
args:
- --external-sources
- repo: https://github.com/cdce8p/python-typing-update
rev: v0.7.2
hooks:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v1.7.5

- Maintenance chores
- Deprecating python 3.12

## v1.7.4

- Maintenance chores

## v1.7.3

- 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)
Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "plugwise"
version = "1.7.4"
version = "1.7.5"
license = "MIT"
description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
readme = "README.md"
Expand All @@ -13,7 +13,6 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Home Automation",
]
Expand All @@ -24,7 +23,7 @@ maintainers = [
{ name = "bouwew"},
{ name = "CoMPaTech" }
]
requires-python = ">=3.12.0"
requires-python = ">=3.13"
dependencies = [
"aiohttp",
"defusedxml",
Expand Down Expand Up @@ -52,7 +51,7 @@ include = ["plugwise*"]
# 20241208: W0201 / attribute-defined-outside-init
# 20241208: R1702 / too-many-nested-blocks # too many nested blocks in test_init 8/5
# 20241208: R6102 / consider-using-tuple
# 20241208: Recommended disabling => "implicit-str-concat", # ISC001 - 2 occurances!
# 20241208: Recommended disabling => "implicit-str-concat", # ISC001 - 2 occurrences!
##

[tool.pylint.MAIN]
Expand Down Expand Up @@ -466,7 +465,6 @@ lint.select = [
"S317", # suspicious-xml-sax-usage
"S318", # suspicious-xml-mini-dom-usage
"S319", # suspicious-xml-pull-dom-usage
"S320", # suspicious-xmle-tree-usage
"S601", # paramiko-call
"S602", # subprocess-popen-with-shell-equals-true
"S604", # call-with-shell-equals-true
Expand Down
31 changes: 18 additions & 13 deletions scripts/complexity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ set -eu

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

# shellcheck disable=SC1091
source "${my_path}/scripts/python-venv.sh"

# shellcheck disable=SC2154
if [ -f "${my_venv}/bin/activate" ]; then
# shellcheck disable=SC1091
. "${my_venv}/bin/activate"
echo "-----------------------------"
echo "Running cyclomatic complexity"
echo "-----------------------------"
PYTHONPATH=$(pwd) radon cc plugwise/ tests/ -s -nc --no-assert
if [ -n "${VIRTUAL_ENV-}" ] && [ -f "${VIRTUAL_ENV}/bin/activate" ]; then
# shellcheck disable=SC1091 # ingesting virtualenv
. "${VIRTUAL_ENV}/bin/activate"
else
echo "Virtualenv available, bailing out"
exit 2
# other common virtualenvs
my_path=$(git rev-parse --show-toplevel)

for venv in venv .venv .; do
if [ -f "${my_path}/${venv}/bin/activate" ]; then
# shellcheck disable=SC1090 # ingesting virtualenv
. "${my_path}/${venv}/bin/activate"
break
fi
done
fi

echo "-----------------------------"
echo "Running cyclomatic complexity"
echo "-----------------------------"
PYTHONPATH=$(pwd) radon cc plugwise/ tests/ -s -nc --no-assert
Loading
Loading