update black to 24.2.0 and ruff to 0.3.0 (#2307)
Co-authored-by: Arc <33088785+arcbtc@users.noreply.github.com>
This commit is contained in:
parent
cb5c9b03bf
commit
3e341a3555
7 changed files with 97 additions and 105 deletions
|
|
@ -55,7 +55,7 @@ wallycore = {version = "^1.0.0", optional = true}
|
|||
liquid = ["wallycore"]
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
black = "^23.7.0"
|
||||
black = "^24.2.0"
|
||||
pytest-asyncio = "^0.21.0"
|
||||
pytest = "^7.3.2"
|
||||
pytest-cov = "^4.1.0"
|
||||
|
|
@ -63,7 +63,7 @@ mypy = "^1.5.1"
|
|||
types-protobuf = "^4.24.0.2"
|
||||
pre-commit = "^3.2.2"
|
||||
openapi-spec-validator = "^0.6.0"
|
||||
ruff = "^0.0.291"
|
||||
ruff = "^0.3.0"
|
||||
# not our dependency but needed indirectly by openapi-spec-validator
|
||||
# we want to use 0.10.3 because newer versions are broken on nix
|
||||
rpds-py = "0.10.3"
|
||||
|
|
@ -152,53 +152,31 @@ extend-exclude = """(
|
|||
# Same as Black. + 10% rule of black
|
||||
line-length = 88
|
||||
|
||||
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
|
||||
# (`I`) is for `isort`.
|
||||
select = ["E", "F", "I"]
|
||||
# Exclude generated files.
|
||||
extend-exclude = [
|
||||
"lnbits/wallets/lnd_grpc_files"
|
||||
]
|
||||
|
||||
[tool.ruff.lint]
|
||||
# Enable:
|
||||
# F - pyflakes
|
||||
# E - pycodestyle errors
|
||||
# W - pycodestyle warnings
|
||||
# I - isort
|
||||
select = ["F", "E", "W", "I"]
|
||||
ignore = []
|
||||
|
||||
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
||||
fixable = ["ALL"]
|
||||
unfixable = []
|
||||
|
||||
# Exclude a variety of commonly ignored directories.
|
||||
exclude = [
|
||||
"lnbits/static",
|
||||
"lnbits/extensions",
|
||||
"lnbits/wallets/lnd_grpc_files",
|
||||
".bzr",
|
||||
".direnv",
|
||||
".eggs",
|
||||
".git",
|
||||
".git-rewrite",
|
||||
".hg",
|
||||
".mypy_cache",
|
||||
".nox",
|
||||
".pants.d",
|
||||
".pytype",
|
||||
".ruff_cache",
|
||||
".svn",
|
||||
".tox",
|
||||
".venv",
|
||||
"__pypackages__",
|
||||
"_build",
|
||||
"buck-out",
|
||||
"build",
|
||||
"dist",
|
||||
"node_modules",
|
||||
"venv",
|
||||
]
|
||||
|
||||
# Allow unused variables when underscore-prefixed.
|
||||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||
|
||||
# Assume Python
|
||||
# target-version = "py39"
|
||||
|
||||
# Ignore unused imports in __init__.py files.
|
||||
[tool.ruff.extend-per-file-ignores]
|
||||
[tool.ruff.lint.extend-per-file-ignores]
|
||||
"__init__.py" = ["F401", "F403"]
|
||||
|
||||
[tool.ruff.mccabe]
|
||||
[tool.ruff.lint.mccabe]
|
||||
# Unlike Flake8, default to a complexity level of 10.
|
||||
max-complexity = 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue