Reduce the amount of flake8 excludes

Change-Id: I07a8ba2c085854bf2815b2a8ee706e2da7730752
Signed-off-by: Jaromir Wysoglad <jwysogla@redhat.com>
This commit is contained in:
Jaromir Wysoglad
2025-10-10 03:14:25 -04:00
committed by Jaromír Wysoglad
parent 4ff4703127
commit 2387b7614b
3 changed files with 5 additions and 17 deletions

View File

@@ -59,7 +59,7 @@ def build_option_parser(parser):
parser.add_argument(
'--os-observability-api-version',
metavar='<observability-api-version>',
help='Observability Plugin API version, default='
+ DEFAULT_API_VERSION
+ ' (Env: OS_OSCPLUGIN_API_VERSION)')
help='Observability Plugin API version, default=' +
DEFAULT_API_VERSION +
' (Env: OS_OSCPLUGIN_API_VERSION)')
return parser

View File

@@ -40,8 +40,7 @@ class PromQLRbac:
def _find_label_value_end(self, query, start, quote_char):
end = start
while (end == start or
query[end - 1] == '\\'):
while (end == start or query[end - 1] == '\\'):
# Looking for first unescaped quotes
end = query.find(quote_char, end + 1)
# returns the quote position or -1

13
tox.ini
View File

@@ -55,19 +55,8 @@ commands = sphinx-build --keep-going -b html doc/source doc/build/html
[flake8]
show-source = True
# A002 argument "input" is shadowing a python builtin
# A003 class attribute "list" is shadowing a python builtin
# D100 Missing docstring in public module
# D101 Missing docstring in public class
# D102 Missing docstring in public method
# D103 Missing docstring in public function
# D104 Missing docstring in public package
# D105 Missing docstring in magic method
# D106 Missing docstring in public nested class
# D107 Missing docstring in __init__
# W503 line break before binary operator
# W504 line break after binary operator
ignore = A002,A003,D100,D101,D102,D103,D104,D105,D106,D107,W503,W504
ignore = W504
exclude = .venv,.git,.tox,dist,doc,*egg,build,*lib/python*
# [H101] Include your name with TODOs as in # TODO(yourname).
# [H104] Empty files should not contain license or comments