mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
refact: apply consistent formatting
This commit is contained in:
@@ -82,7 +82,7 @@ app = "python -m kleinanzeigen_bot"
|
||||
compile.cmd = "python -O -m PyInstaller pyinstaller.spec --clean"
|
||||
compile.env = {PYTHONHASHSEED = "1", SOURCE_DATE_EPOCH = "0"} # https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build
|
||||
debug = "python -m pdb -m kleinanzeigen_bot"
|
||||
format = "autopep8 --recursive --in-place src tests --verbose"
|
||||
format = {shell = "autopep8 --recursive --in-place scripts src tests --verbose && python scripts/post_autopep8.py scripts src tests" }
|
||||
lint = {shell = "ruff check && mypy && basedpyright" }
|
||||
fix = {shell = "ruff check --fix" }
|
||||
test = "python -m pytest --capture=tee-sys -v"
|
||||
@@ -113,7 +113,7 @@ aggressive = 3
|
||||
# https://docs.astral.sh/ruff/configuration/
|
||||
#####################
|
||||
[tool.ruff]
|
||||
include = ["pyproject.toml", "src/**/*.py", "tests/**/*.py"]
|
||||
include = ["pyproject.toml", "scripts/**/*.py", "src/**/*.py", "tests/**/*.py"]
|
||||
line-length = 160
|
||||
indent-width = 4
|
||||
target-version = "py310"
|
||||
@@ -208,14 +208,10 @@ ignore = [
|
||||
"TC006", # Add quotes to type expression in `typing.cast()`
|
||||
]
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "double"
|
||||
indent-style = "space"
|
||||
line-ending = "native"
|
||||
docstring-code-format = false
|
||||
skip-magic-trailing-comma = false
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"scripts/**/*.py" = [
|
||||
"INP001", # File `...` is part of an implicit namespace package. Add an `__init__.py`.
|
||||
]
|
||||
"tests/**/*.py" = [
|
||||
"ARG",
|
||||
"B",
|
||||
@@ -247,7 +243,7 @@ max-statements = 150 # max. number of statements in function / method body (R091
|
||||
# https://mypy.readthedocs.io/en/stable/config_file.html
|
||||
#mypy_path = "$MYPY_CONFIG_FILE_DIR/tests/stubs"
|
||||
python_version = "3.10"
|
||||
files = "src,tests"
|
||||
files = "scripts,src,tests"
|
||||
strict = true
|
||||
disallow_untyped_calls = false
|
||||
disallow_untyped_defs = true
|
||||
@@ -264,7 +260,7 @@ verbosity = 0
|
||||
#####################
|
||||
[tool.basedpyright]
|
||||
# https://docs.basedpyright.com/latest/configuration/config-files/
|
||||
include = ["src", "tests"]
|
||||
include = ["scripts", "src", "tests"]
|
||||
defineConstant = { DEBUG = false }
|
||||
pythonVersion = "3.10"
|
||||
typeCheckingMode = "standard"
|
||||
|
||||
Reference in New Issue
Block a user