Skip to content

Commit 824f857

Browse files
committed
ci: use ruff instead of flake8, black etc
1 parent f6fcc19 commit 824f857

File tree

5 files changed

+7
-45
lines changed

5 files changed

+7
-45
lines changed

.flake8

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

.isort.cfg

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

.pre-commit-config.yaml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,13 @@ repos:
1414
- --autofix
1515
- --no-sort-keys
1616

17-
- repo: https://github.com/psf/black
18-
rev: 23.10.1
17+
- repo: https://github.com/astral-sh/ruff-pre-commit
18+
rev: v0.12.1
1919
hooks:
20-
- id: black
20+
- id: ruff-check
2121
args:
22-
- --safe
23-
- --quiet
24-
files: ^((custom_components)/.+)?[^/]+\.py$
25-
26-
- repo: https://github.com/pycqa/flake8
27-
rev: 6.1.0
28-
hooks:
29-
- id: flake8
30-
additional_dependencies:
31-
- flake8-docstrings==1.6.0
32-
- pydocstyle==6.1.1
33-
files: ^(custom_components)/.+\.py$
34-
35-
- repo: https://github.com/PyCQA/isort
36-
rev: 5.12.0
37-
hooks:
38-
- id: isort
39-
40-
- repo: https://github.com/asottile/pyupgrade
41-
rev: v3.15.0
42-
hooks:
43-
- id: pyupgrade
22+
- --fix
23+
- id: ruff-format
4424

4525
- repo: https://github.com/adrienverge/yamllint
4626
rev: v1.32.0

custom_components/avanza_stock/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Constants for avanza_stock."""
2+
23
__version__ = "1.5.4"
34

45
DEFAULT_NAME = "Avanza Stock"

custom_components/avanza_stock/sensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
For more details about this platform, please refer to the documentation at
55
https://github.com/custom-components/sensor.avanza_stock/blob/master/README.md
66
"""
7+
78
import logging
89
from datetime import timedelta
910

0 commit comments

Comments
 (0)