mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
chore: add Bugbear Ruff checking
This commit is contained in:
parent
b25520cf18
commit
97c937e554
|
@ -468,7 +468,7 @@ class Configuration:
|
||||||
else:
|
else:
|
||||||
logger.info(logstring.format(config[argname]))
|
logger.info(logstring.format(config[argname]))
|
||||||
if deprecated_msg:
|
if deprecated_msg:
|
||||||
warnings.warn(f"DEPRECATED: {deprecated_msg}", DeprecationWarning)
|
warnings.warn(f"DEPRECATED: {deprecated_msg}", DeprecationWarning, stacklevel=1)
|
||||||
|
|
||||||
def _resolve_pairs_list(self, config: Config) -> None:
|
def _resolve_pairs_list(self, config: Config) -> None:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -128,7 +128,7 @@ target-version = "py38"
|
||||||
# Exclude UP036 as it's causing the "exit if < 3.9" to fail.
|
# Exclude UP036 as it's causing the "exit if < 3.9" to fail.
|
||||||
extend-select = [
|
extend-select = [
|
||||||
"C90", # mccabe
|
"C90", # mccabe
|
||||||
# "B", # bugbear
|
"B", # bugbear
|
||||||
# "N", # pep8-naming
|
# "N", # pep8-naming
|
||||||
"F", # pyflakes
|
"F", # pyflakes
|
||||||
"E", # pycodestyle
|
"E", # pycodestyle
|
||||||
|
@ -155,10 +155,11 @@ extend-ignore = [
|
||||||
"E272", # Multiple spaces before keyword
|
"E272", # Multiple spaces before keyword
|
||||||
"E221", # Multiple spaces before operator
|
"E221", # Multiple spaces before operator
|
||||||
"B007", # Loop control variable not used
|
"B007", # Loop control variable not used
|
||||||
|
"B904", # BugBear - except raise from
|
||||||
"S603", # `subprocess` call: check for execution of untrusted input
|
"S603", # `subprocess` call: check for execution of untrusted input
|
||||||
"S607", # Starting a process with a partial executable path
|
"S607", # Starting a process with a partial executable path
|
||||||
"S608", # Possible SQL injection vector through string-based query construction
|
"S608", # Possible SQL injection vector through string-based query construction
|
||||||
"NPY002", # Numpy legacy random generator
|
"NPY002", # Numpy legacy random generator
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.lint.mccabe]
|
[tool.ruff.lint.mccabe]
|
||||||
|
@ -166,7 +167,9 @@ max-complexity = 12
|
||||||
|
|
||||||
[tool.ruff.lint.per-file-ignores]
|
[tool.ruff.lint.per-file-ignores]
|
||||||
"freqtrade/freqai/**/*.py" = [
|
"freqtrade/freqai/**/*.py" = [
|
||||||
"S311" # Standard pseudo-random generators are not suitable for cryptographic purposes
|
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
|
||||||
|
"B006", # Bugbear - mutable default argument
|
||||||
|
"B008", # bugbear - Do not perform function calls in argument defaults
|
||||||
]
|
]
|
||||||
"tests/**/*.py" = [
|
"tests/**/*.py" = [
|
||||||
"S101", # allow assert in tests
|
"S101", # allow assert in tests
|
||||||
|
|
Loading…
Reference in New Issue
Block a user