Skip to content

Commit 25dbdbd

Browse files
authored
Merge pull request #279 from plugwise/flake8_2_ruff
Replace flake8 with ruff
2 parents 8027123 + b090774 commit 25dbdbd

File tree

10 files changed

+154
-137
lines changed

10 files changed

+154
-137
lines changed

.flake8

Lines changed: 0 additions & 21 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ci:
2-
skip: [pylint, markdownlint]
2+
skip: [pylint, markdownlint, testing]
33
submodules: true
44

55
default_language_version:
@@ -39,20 +39,12 @@ repos:
3939
hooks:
4040
- id: codespell
4141
exclude_types: [csv, json]
42-
- repo: https://github.com/PyCQA/flake8
43-
rev: 6.0.0
42+
- repo: https://github.com/charliermarsh/ruff-pre-commit
43+
rev: v0.0.259
4444
hooks:
45-
- id: flake8
46-
additional_dependencies:
47-
- pycodestyle==2.10.0
48-
- pyflakes==3.0.1
49-
- flake8-docstrings==1.6.0
50-
- pydocstyle==6.1.1
51-
- flake8-comprehensions==3.10.1
52-
- flake8-noqa==1.3.0
53-
- mccabe==0.7.0
54-
files: ^(plugwise|tests)/.+\.py$
55-
args: ["--verbose", "--append-config=setup.cfg"]
45+
- id: ruff
46+
args:
47+
- --fix
5648
- repo: https://github.com/PyCQA/bandit
5749
rev: 1.7.5
5850
hooks:
@@ -108,6 +100,12 @@ repos:
108100
language: script
109101
types: [python]
110102
files: ^plugwise/.+\.py$
103+
- id: testing
104+
name: "Local Testing - Performing Tests"
105+
# yamllint disable-line rule:line-length
106+
entry: /usr/bin/env bash -c 'exec env GITHUB_ACTIONS="1" scripts/tests_and_coverage.sh test_and_coverage'
107+
language: script
108+
pass_filenames: false
111109
- repo: https://github.com/igorshubovych/markdownlint-cli
112110
rev: v0.33.0
113111
hooks:

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
## Ongoing
44

5-
- Improved markdown (i.e. markup and contents), added linter for markdown & added code owners
6-
- Default to python 3.11
5+
- `Dependencies`: Default to python 3.11
6+
- `Development`
7+
- Improved markdown (i.e. markup and contents), added linter for markdown & added code owners
8+
- Replaced flake8 linting with ruff (following HA-Core)
9+
- Improved testing on commit
710

811
## v0.27.8: Stick bugfix: fix for reported Plugwise-Beta issue [#347](https://github.com/plugwise/plugwise-beta/issues/347)
912

@@ -13,7 +16,7 @@
1316

1417
- [#312](https://github.com/plugwise/plugwise-beta/issues/312)
1518
- Fix Stick-related memory-leaks
16-
- Add python 3.11 support
19+
- `Dependencies`: Add python 3.11 support
1720

1821
## v0.27.6: Stick bugfix: properly handle responses without mac
1922

plugwise/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Plugwise module."""
22

3-
from plugwise.smile import Smile
4-
from plugwise.stick import Stick
3+
from plugwise.smile import Smile # noqa: F401
4+
from plugwise.stick import Stick # noqa: F401

0 commit comments

Comments
 (0)