Skip to content

Commit 99b96dc

Browse files
authored
#735 replace black with Ruff (#736)
1 parent e3a903b commit 99b96dc

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

.github/workflows/py3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
docker network prune -f
3333
3434
- name: Run Linter
35-
run: black --diff --check pynetbox tests
35+
run: ruff check pynetbox/ tests/
3636

3737
- name: Run Tests
3838
run: pytest --netbox-versions=${{ matrix.netbox }}

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/astral-sh/ruff-pre-commit
5+
rev: v0.14.1
6+
hooks:
7+
- id: ruff
8+
name: "Ruff linter"
9+
args: [ pynetbox/, tests/ ]

pynetbox/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@
1010

1111
# Lowercase alias for backward compatibility
1212
api = Api
13+
14+
__all__ = (
15+
"Api",
16+
"AllocationError",
17+
"ContentError",
18+
"RequestError",
19+
"ParameterValidationError",
20+
"api",
21+
"__version__",
22+
)

requirements-dev.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
black
2-
pytest
3-
pytest-docker
4-
PyYAML
51
mkdocs-material==9.6.14
62
mkdocstrings[python]==0.29.1
73
pymdown-extensions>=10.0
4+
pytest
5+
pytest-docker
6+
PyYAML
7+
ruff

0 commit comments

Comments
 (0)