Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ruff exclude #212

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions changes/212.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed ruff excludes to use per-file excludes instead of global excludes.
23 changes: 15 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,10 @@ supported_nautobot_versions = [
[tool.ruff]
line-length = 120
target-version = "py38"
exclude = [
"migrations",
]

[tool.ruff.lint]
select = [
"D1", # pydocstyle
"D2", # pydocstyle
"D3", # pydocstyle
"D4", # pydocstyle
"D", # pydocstyle
]
ignore = [
# warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible.
Expand All @@ -137,8 +131,21 @@ ignore = [
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line

# Produces a lot of issues in the current codebase.
# Produces issues in the current codebase.
"D401", # First line of docstring should be in imperative mood
"D407", # Missing dashed underline after section
"D416", # Section name ends in colon
]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
"nautobot_firewall_models/migrations/*" = [
"D", # pydocstyle
]
"nautobot_firewall_models/tests/*" = [
"D", # pydocstyle
]

[build-system]
Expand Down