diff --git a/python/neutron-understack/neutron_understack/argo/workflows.py b/python/neutron-understack/neutron_understack/argo/workflows.py index 8c0a09aad..fc83ac3e9 100644 --- a/python/neutron-understack/neutron_understack/argo/workflows.py +++ b/python/neutron-understack/neutron_understack/argo/workflows.py @@ -1,5 +1,6 @@ -import requests import time + +import requests import urllib3 urllib3.disable_warnings() diff --git a/python/neutron-understack/neutron_understack/tests/test_neutron_understack_mech.py b/python/neutron-understack/neutron_understack/tests/test_neutron_understack_mech.py index e53381067..2b6fe69cb 100644 --- a/python/neutron-understack/neutron_understack/tests/test_neutron_understack_mech.py +++ b/python/neutron-understack/neutron_understack/tests/test_neutron_understack_mech.py @@ -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 diff --git a/python/neutron-understack/pyproject.toml b/python/neutron-understack/pyproject.toml index 240a52a4c..b3866fbba 100644 --- a/python/neutron-understack/pyproject.toml +++ b/python/neutron-understack/pyproject.toml @@ -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"