Skip to content

Commit

Permalink
chore(neutron-understack): use ruff for linting
Browse files Browse the repository at this point in the history
Enabled ruff rules and cleaned up the files.
  • Loading branch information
cardoe committed Sep 4, 2024
1 parent 03590b2 commit d866490
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import requests
import time

import requests
import urllib3

urllib3.disable_warnings()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import json
import pathlib
from dataclasses import dataclass
from unittest.mock import patch
from unittest.mock import mock_open
from unittest.mock import patch

import pytest
import pathlib
import json

from neutron_understack.neutron_understack_mech import UnderstackDriver

Expand Down
31 changes: 31 additions & 0 deletions python/neutron-understack/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,34 @@ addopts = "-ra --cov=neutron_understack"
testpaths = [
"tests",
]

[tool.ruff]
target-version = "py38"
fix = true

[tool.ruff.lint]
select = [
# "D", # pydocstyle
"E", # pycodestyle (error)
"F", # pyflakes
"B", # flake8-bugbear
"I", # isort
"UP", # pyupgrade
"ASYNC", # flake8-async
]

ignore = [
"D100", # don't require docs for every module
"D101", # don't require docs for every class
"D102", # don't require docs for every class method
"D103", # don't require docs for every function
"D104", # don't require docs for every package
"D417" # don't require docs for every function parameter
]

[tool.ruff.lint.isort]
force-single-line = true

[tool.ruff.lint.pydocstyle]
# enable the google doc style rules by default
convention = "google"

0 comments on commit d866490

Please sign in to comment.