2024-06-21 16:19:29 +03:00
|
|
|
[build-system]
|
|
|
|
requires = ["setuptools", "wheel"]
|
|
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
|
|
|
|
[tool.setuptools]
|
|
|
|
name = "olympia"
|
|
|
|
version = "0.1.0"
|
|
|
|
description = "This is https://addons.mozilla.org (AMO)"
|
|
|
|
author = "The Mozilla Team"
|
|
|
|
author_email = "amo-developers@mozilla.org"
|
|
|
|
url = "https://addons.mozilla.org/"
|
|
|
|
package_dir = {"" = "src"}
|
|
|
|
packages = "find:" # This tells setuptools to use find_packages() to discover packages
|
|
|
|
include_package_data = true
|
|
|
|
zip_safe = false
|
|
|
|
classifiers = [
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
"Environment :: Web Environment",
|
|
|
|
"Intended Audience :: End Users/Desktop",
|
|
|
|
"License :: OSI Approved :: Mozilla Public License",
|
|
|
|
"Operating System :: POSIX",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Framework :: Django",
|
|
|
|
"Topic :: Internet :: WWW/HTTP :: Browsers",
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
]
|
|
|
|
|
2023-05-10 12:14:51 +03:00
|
|
|
[tool.ruff]
|
|
|
|
exclude = [
|
|
|
|
"docs",
|
|
|
|
"static",
|
|
|
|
".git",
|
|
|
|
"*/migrations/*.py",
|
|
|
|
]
|
2024-02-15 15:56:30 +03:00
|
|
|
line-length = 88
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
2024-09-05 14:07:00 +03:00
|
|
|
ignore = []
|
2023-05-10 12:14:51 +03:00
|
|
|
select = [
|
2023-07-10 17:31:09 +03:00
|
|
|
"B", # flake8-bugbear
|
|
|
|
"E", # pycodestyle errors
|
|
|
|
"F", # pyflakes
|
|
|
|
"I", # isort
|
|
|
|
"Q", # flake8-quotes
|
|
|
|
"W", # pycodestyle warnings
|
2023-05-10 12:14:51 +03:00
|
|
|
]
|
|
|
|
|
2024-02-15 15:56:30 +03:00
|
|
|
[tool.ruff.lint.flake8-quotes]
|
2023-05-10 12:14:51 +03:00
|
|
|
inline-quotes = "single"
|
|
|
|
|
2024-02-15 15:56:30 +03:00
|
|
|
[tool.ruff.lint.isort]
|
2023-05-23 17:36:16 +03:00
|
|
|
combine-as-imports = true
|
|
|
|
lines-after-imports = 2
|
|
|
|
section-order = ["future", "standard-library", "django", "third-party", "first-party", "local-folder"]
|
2024-02-15 15:56:30 +03:00
|
|
|
[tool.ruff.lint.isort.sections]
|
2023-05-23 17:36:16 +03:00
|
|
|
"django" = ["django"]
|
|
|
|
|
2024-02-15 15:56:30 +03:00
|
|
|
[tool.ruff.format]
|
|
|
|
quote-style = "single"
|
|
|
|
line-ending = "lf"
|
|
|
|
|
2021-02-03 15:52:30 +03:00
|
|
|
[tool.pytest.ini_options]
|
|
|
|
addopts = "-vs --reuse-db --showlocals --tb=short"
|
|
|
|
python_files = "test*.py"
|
|
|
|
norecursedirs = [
|
|
|
|
"node_modules",
|
|
|
|
"locale",
|
|
|
|
"static",
|
|
|
|
"media",
|
|
|
|
"site-static",
|
|
|
|
"user-media",
|
|
|
|
"tmp",
|
|
|
|
"templates",
|
|
|
|
"fixtures",
|
|
|
|
"migrations",
|
|
|
|
".*",
|
|
|
|
"*.egg",
|
|
|
|
"dist",
|
|
|
|
"cache",
|
|
|
|
"venv",
|
|
|
|
"__pycache__",
|
|
|
|
]
|
|
|
|
DJANGO_SETTINGS_MODULE = "settings_test"
|
|
|
|
# Ignoring csp deprecation warnings, we have control over the module and
|
|
|
|
# currently it warns for child-src which is deprecated in CSPv3 but we're still
|
|
|
|
# on CSP 2 while CSP 3 is still in working draft (sept 2018)
|
|
|
|
filterwarnings = [
|
|
|
|
"default",
|
|
|
|
"ignore:::csp.utils",
|
|
|
|
# Ignore ResourceWarning for now. It's a Python 3 thing :-/
|
|
|
|
"ignore::ResourceWarning",
|
|
|
|
]
|
|
|
|
markers = [
|
|
|
|
"es_tests: mark a test as an elasticsearch test.",
|
|
|
|
"needs_locales_compilation: mark a test as needing compiled locales to work.",
|
|
|
|
"allow_external_http_requests: mark a test to allow external http requests and disable responses.",
|
|
|
|
"static_assets: Tests that are depending on `compress_assets` and require to be separated with other tests.",
|
|
|
|
"internal_routes_allowed: mark a test as needing INTERNAL_ROUTES_ALLOWED=True.",
|
|
|
|
]
|