All checks were successful
Run tests and linters / test (pull_request) Successful in 2m29s
Adjusting to the new ruleset will be considerable work. Keep the original ruleset for now. Fixes: #322
61 lines
2.3 KiB
TOML
61 lines
2.3 KiB
TOML
[tool.ruff]
|
|
# Target environment Python version, keep in sync with builder defined at:
|
|
# https://forge.fedoraproject.org/infra/ansible/src/branch/main/roles/openshift-apps/blockerbugs/templates/buildconfig.yml.j2
|
|
target-version = "py311"
|
|
line-length = 100
|
|
extend-exclude = [
|
|
"alembic/",
|
|
"blockerbugs/_version.py",
|
|
"conf/",
|
|
"docs/source/conf.py",
|
|
"versioneer.py",
|
|
]
|
|
|
|
[tool.ruff.lint]
|
|
# FIXME: This is the default rule set for ruff 0.15. From 0.16, a much larger default rule set
|
|
# is used. We should gradually adjust code to satisfy the new checks (or define our own ruleset).
|
|
# https://astral.sh/blog/ruff-v0.16.0#migrating-to-v016
|
|
# https://forge.fedoraproject.org/quality/blockerbugs/issues/322
|
|
select = ["E4", "E7", "E9", "F"]
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["blockerbugs"]
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "2.0"
|
|
python_functions = ["test", "should"]
|
|
python_files = ["test_*", "testfunc_*"]
|
|
testpaths = ["testing"]
|
|
addopts = "--cov-config=setup.cfg --cov-report term-missing --cov-report html:build/coverage/"
|
|
filterwarnings = [
|
|
"ignore::DeprecationWarning:ast",
|
|
"ignore::DeprecationWarning:dateutil",
|
|
"ignore::DeprecationWarning:flask_admin",
|
|
"ignore::DeprecationWarning:flask_sqlalchemy",
|
|
"ignore::DeprecationWarning:openid",
|
|
"ignore::DeprecationWarning:pkg_resources",
|
|
"ignore::DeprecationWarning:werkzeug",
|
|
"ignore::DeprecationWarning:testcontainers",
|
|
]
|
|
log_cli = true
|
|
log_cli_level = "INFO"
|
|
log_cli_format = "%(asctime)s [%(levelname)8s] (%(filename)s:%(lineno)s) %(message)s"
|
|
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
|
|
log_file = "pytest.log"
|
|
log_file_level = "INFO"
|
|
log_file_format = "%(asctime)s [%(levelname)8s] (%(filename)s:%(lineno)s) %(message)s"
|
|
log_file_date_format = "%Y-%m-%d %H:%M:%S"
|
|
|
|
[tool.mypy]
|
|
# what directory/files to check
|
|
files = "blockerbugs/, testing/, scripts/, *.py"
|
|
# Target environment Python version, keep in sync with builder defined at:
|
|
# https://forge.fedoraproject.org/infra/ansible/src/branch/main/roles/openshift-apps/blockerbugs/templates/buildconfig.yml.j2
|
|
python_version = "3.11"
|
|
# Ignore missing stubs/types for third-party libraries that don't provide them
|
|
ignore_missing_imports = true
|
|
# Exclude auto-generated and third-party vendored files
|
|
exclude = [
|
|
"^blockerbugs/_version\\.py$",
|
|
"^versioneer\\.py$",
|
|
]
|