Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion .github/workflows/py3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
docker network prune -f

- name: Run Linter
run: black --diff --check pynetbox tests
run: ruff check pynetbox/ tests/

- name: Run Tests
run: pytest --netbox-versions=${{ matrix.netbox }}
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.1
hooks:
- id: ruff
name: "Ruff linter"
args: [ pynetbox/, tests/ ]
10 changes: 10 additions & 0 deletions pynetbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@

# Lowercase alias for backward compatibility
api = Api

__all__ = [
"Api",
"AllocationError",
"ContentError",
"RequestError",
"ParameterValidationError",
"api",
"__version__",
]
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black
ruff
pytest
pytest-docker
PyYAML
Expand Down