Skip to content

Commit 781261b

Browse files
committed
Update for new version of linters and addition of RUFF
1 parent 01ac4e4 commit 781261b

File tree

8 files changed

+54
-15
lines changed

8 files changed

+54
-15
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
name: Feature request
33
about: Suggest an idea for this project
44
title: "[Feature]"
5-
labels: ''
6-
assignees: ''
7-
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/workflows/check-spelling.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919

2020
steps:
2121
- name: Checkout Code
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v5
23+
with:
24+
persist-credentials: false
2325

2426
- name: Check Spelling
25-
uses: codespell-project/actions-codespell@master
27+
uses: codespell-project/actions-codespell@42fe0b24d5b632e195b6e63de8e7d18f538f14f1 # master
2628
with:
2729
check_filenames: true

.github/workflows/linter.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ jobs:
2020

2121
steps:
2222
- name: Checkout Code
23-
uses: actions/checkout@v5
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v5
2424
with:
2525
# Full git history is needed to get a proper
2626
# list of changed files within `super-linter`
2727
fetch-depth: 0
28+
persist-credentials: false
2829

2930
- name: Lint Code Base
30-
uses: super-linter/super-linter/slim@v8.2.1
31+
uses: super-linter/super-linter/slim@96eef5c0c16e2eaa3a49f8f6f68e8b8d33db5d0d # v8.2.1
3132
env:
3233
LINTER_RULES_PATH: /
3334
VALIDATE_ALL_CODEBASE: true

.github/workflows/pytest.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ jobs:
1717
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1818

1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v5
21+
with:
22+
persist-credentials: false
2123
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v6
24+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v6
2325
with:
2426
python-version: ${{ matrix.python-version }}
2527
- name: Install uv
26-
uses: astral-sh/setup-uv@v3
28+
uses: astral-sh/setup-uv@4e339f4c209f54b534c1b7207e03126c0cb9ac3f # v3
2729
- name: Install dependencies
2830
run: |
2931
uv venv

format.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ uv run black .
1212
uv run isort .
1313
uv run flake8 .
1414
uv run pylint main.py src/ tests/
15+
uv run ruff check --fix .
16+
uv run ruff format .
1517

1618
# Clean up
1719
find . -name ".pytest_cache" -type d -exec /bin/rm -rf {} +

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ dev = [
3434
"pytest",
3535
"pytest-cov",
3636
"pytest-mock",
37+
"ruff",
3738
]
39+
40+
[tool.ruff.lint]
41+
extend-select = ["B"]

src/devices/library.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# pylint: disable=unused-import, ungrouped-imports, wrong-import-position
66
# mypy: ignore-errors
7+
# ruff: noqa: F401
78

89
from src import mock_config
910

uv.lock

Lines changed: 33 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)