From 3eacc967c6a7adec09db7edf478197f57ead9880 Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Sun, 24 Mar 2024 07:05:53 +0100 Subject: [PATCH] Update deprecated syntax in pyproject.toml --- pyproject.toml | 70 ++++++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 85fa81e4..e1f1b196 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ description = "Client installation for users of DiracX installations" readme = "README.md" requires-python = ">=3.10" keywords = [] -license = {text = "GPL-3.0-only"} +license = { text = "GPL-3.0-only" } classifiers = [ "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", @@ -12,18 +12,11 @@ classifiers = [ "Topic :: Scientific/Engineering", "Topic :: System :: Distributed Computing", ] -dependencies = [ - "diracx-api", - "diracx-cli", - "diracx-client", - "diracx-core", -] +dependencies = ["diracx-api", "diracx-cli", "diracx-client", "diracx-core"] dynamic = ["version"] [project.optional-dependencies] -testing = [ - "diracx-testing", -] +testing = ["diracx-testing"] [tool.setuptools] packages = [] @@ -35,38 +28,51 @@ build-backend = "setuptools.build_meta" [tool.setuptools_scm] [tool.ruff] -select = [ - "E", # pycodestyle errrors - "F", # pyflakes - "B", # flake8-bugbear - "I", # isort - "PLE", # pylint errors - # "UP", # pyUpgrade - "FLY", # flynt - "DTZ", # flake8-datetimez - "S", # flake8-bandit -] -ignore = ["B905", - "B008", - "B006", - "S101", # bandit: use of assert https://docs.astral.sh/ruff/rules/assert/ - ] line-length = 120 src = ["diracx-*/src", "diracx-*/tests"] exclude = ["diracx-client/src/diracx/client/"] +[tool.ruff.lint] +select = [ + "E", # pycodestyle errrors + "F", # pyflakes + "B", # flake8-bugbear + "I", # isort + "PLE", # pylint errors + # "UP", # pyUpgrade + "FLY", # flynt + "DTZ", # flake8-datetimez + "S", # flake8-bandit +] + +ignore = [ + "B905", + "B008", + "B006", + "S101", # bandit: use of assert https://docs.astral.sh/ruff/rules/assert/ +] + + [tool.ruff.lint.per-file-ignores] # Ignore Bandit security checks in the test directories "diracx-testing/*" = ["S"] "diracx-*/tests/*" = ["S"] +[tool.ruff.lint.flake8-bugbear] +# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`. +extend-immutable-calls = [ + "fastapi.Depends", + "fastapi.Query", + "fastapi.Path", + "fastapi.Body", + "fastapi.Header", +] + + [tool.isort] profile = "black" -[tool.ruff.flake8-bugbear] -# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`. -extend-immutable-calls = ["fastapi.Depends", "fastapi.Query", "fastapi.Path", "fastapi.Body", "fastapi.Header"] [tool.mypy] files = [ @@ -111,8 +117,10 @@ testpaths = [ ] addopts = [ "-v", - "--cov=diracx", "--cov-report=term-missing", - "-pdiracx.testing", "-pdiracx.testing.osdb", + "--cov=diracx", + "--cov-report=term-missing", + "-pdiracx.testing", + "-pdiracx.testing.osdb", "--import-mode=importlib", ] asyncio_mode = "auto"