diff --git a/.bandit.yaml b/.bandit.yaml deleted file mode 100644 index a04a4bb1dca..00000000000 --- a/.bandit.yaml +++ /dev/null @@ -1,31 +0,0 @@ -profile: - sql: - exclude: - - /commons/c2cgeoportal_commons/alembic/main/ - - /commons/c2cgeoportal_commons/alembic/static/ - tests: - - B608 # Possible SQL injection vector through string-based query construction. - subprocess: - exclude: - - /commons/c2cgeoportal_commons/testing/ - - /commons/tests/ - - /geoportal/tests/ - - /geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py - - /admin/tests/ - tests: - - B603 # subprocess call - check for execution of untrusted input. - - B607 # Starting a process with a partial executable path - - B404 # Consider possible security implications associated with call module. - tmp: - exclude: - - /geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py - tests: - - B108 # Probable insecure usage of temp file/directory. -skips: - - B101 # Test for use of assert - - B603 # subprocess call - check for execution of untrusted input. - - B607 # Starting a process with a partial executable path - - B608 # Possible SQL injection vector through string-based query construction. - - B108 # Probable insecure usage of temp file/directory. - - B404 # Consider possible security implications associated with call module. - - B113 # Requests call without timeout. Done by c2cwsgiutils diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0688a4e1c0a..58ef79b7329 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -34,7 +34,7 @@ jobs: # When we upgrade this we should also upgrade the requirements # in the documentation: doc/integrator/requirements.rst # and the first pyupgrade pre-commit hook in .pre-commit-config.yaml - MIN_PYTHON_VERSION: '3.8' + MIN_PYTHON_VERSION: '3.10' steps: - run: '! ls BACKPORT_TODO' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3be1489d3b7..5456591758f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -104,64 +104,24 @@ repos: docker/config/haproxy_dev/localhost\.pem |geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter\.project}}/mapserver/data/TM_EUROPE_BORDERS-0.3\.sql )$ - - repo: https://github.com/asottile/pyupgrade - rev: v3.19.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.8.1 hooks: - # The script that will run on the project host - - id: pyupgrade + - id: ruff-format args: - - --py38-plus - files: |- - (?x)^( - geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter\.project}}/(build - |scripts/.*) - |scripts/(get-version - |upgrade) - )$ - # All other - - id: pyupgrade - args: - - --py310-plus - # geoportal/c2cgeoportal_geoportal/views/theme\.py is present because of issue: - # https://bugs.launchpad.net/lxml/+bug/2079018 - exclude: |- - (?x)^( - geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter\.project}}/(build - |scripts/.*) - |scripts/(get-version - |upgrade) - |geoportal/c2cgeoportal_geoportal/views/theme\.py - )$ - - repo: https://github.com/PyCQA/autoflake - rev: v2.3.1 - hooks: - - id: autoflake - - repo: https://github.com/PyCQA/isort - rev: 5.13.2 - hooks: - - id: isort - - repo: https://github.com/psf/black - rev: 24.10.0 - hooks: - - id: black - exclude: |- - (?x)^( - commons/c2cgeoportal_commons/alembic/script\.py\.mako - |.*\.rst - |.*\.rst\.tmpl - |geoportal/c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/{{cookiecutter.package}}_geoportal/__init__\.py - )$ + - --line-length=110 - repo: https://github.com/PyCQA/prospector rev: v1.13.3 hooks: - id: prospector args: - - --tool=pydocstyle + - --tool=ruff - --die-on-tool-error - --output-format=pylint additional_dependencies: - prospector-profile-duplicated==1.8.0 # pypi - prospector-profile-utils==1.13.0 # pypi + - ruff==0.8.1 # pypi - repo: https://github.com/sbrunner/jsonschema-validator rev: 0.3.2 hooks: diff --git a/.prospector.yaml b/.prospector.yaml index 95964a60c7a..55129a92324 100644 --- a/.prospector.yaml +++ b/.prospector.yaml @@ -3,6 +3,7 @@ inherits: - utils:base - utils:fix - utils:no-design-checks + - utils:unsafe ignore-paths: - commons/setup.py @@ -10,28 +11,3 @@ ignore-paths: - admin/setup.py - geoportal/c2cgeoportal_geoportal/scaffolds - docker/qgisserver - -pycodestyle: - disable: - # Buggy checks with Python 3.12 - - W604 # backticks are deprecated, use 'repr()' - - W603 # '<>' is deprecated, use '!=' - - E702 # multiple statements on one line (semicolon) - - E713 # test for membership should be 'not in' - -pydocstyle: - disable: - - D102 # Missing docstring in public method - - D104 # Missing docstring in public package - - D105 # Missing docstring in magic method - - D107 # Missing docstring in __init__ - - D200 # One-line docstring should fit on one line with quotes - - D202 # No blank lines allowed after function docstring (found 1) - - D203 # 1 blank line required before class docstring (found 0) - - D212 # Multi-line docstring summary should start at the first line - - D407 # Missing dashed underline after section ('Arguments') - - D412 # No blank lines allowed between a section header and its content ('Arguments') - -bandit: - options: - config: .bandit.yaml diff --git a/doc/integrator/requirements.rst b/doc/integrator/requirements.rst index 7181204e539..3f3cad91c24 100644 --- a/doc/integrator/requirements.rst +++ b/doc/integrator/requirements.rst @@ -11,7 +11,7 @@ components installed on your system: * **Git** * **Docker** >= 17.05 -* **Python** >= 3.8, with ``pip`` +* **Python** >= 3.10, with ``pip`` * **Apache** >= 2.4 (optional, can be used as a front for SSL) * **PostgreSQL** >= 9.1/**PostGIS** >= 2.1 diff --git a/doc/pyproject.toml b/doc/pyproject.toml index 1bb00bb8bac..d894991c3da 100644 --- a/doc/pyproject.toml +++ b/doc/pyproject.toml @@ -1,11 +1,3 @@ -[tool.black] -line-length = 110 -target-version = ['py39'] - -[tool.isort] -profile = "black" -line_length = 110 - [tool.poetry] name = 'c2cgeoportal' version = '0.0.0' diff --git a/docker/qgisserver/.bandit.yaml b/docker/qgisserver/.bandit.yaml deleted file mode 100644 index 1bf9b483e1a..00000000000 --- a/docker/qgisserver/.bandit.yaml +++ /dev/null @@ -1,2 +0,0 @@ -skips: - - B101 # Use of assert detected. diff --git a/docker/qgisserver/.prospector.yaml b/docker/qgisserver/.prospector.yaml index 7c072ce7a21..e71bb10da09 100644 --- a/docker/qgisserver/.prospector.yaml +++ b/docker/qgisserver/.prospector.yaml @@ -7,6 +7,6 @@ inherits: pyroma: run: False -bandit: +mypy: options: - config: .bandit.yaml + python_version: '3.10' diff --git a/docker/qgisserver/poetry.lock b/docker/qgisserver/poetry.lock index 9d04896bb67..d8fc2352acd 100644 --- a/docker/qgisserver/poetry.lock +++ b/docker/qgisserver/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "astroid" @@ -1007,6 +1007,7 @@ pylint-django = ">=2.6.1" pylint-flask = "0.6" PyYAML = "*" requirements-detector = ">=1.3.2" +ruff = {version = "*", optional = true, markers = "extra == \"with-ruff\" or extra == \"with_everything\""} setoptconf-tmp = ">=0.3.1,<0.4.0" toml = ">=0.10.2,<0.11.0" @@ -1416,6 +1417,33 @@ typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.1 [package.extras] jupyter = ["ipywidgets (>=7.5.1,<9)"] +[[package]] +name = "ruff" +version = "0.8.1" +description = "An extremely fast Python linter and code formatter, written in Rust." +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.8.1-py3-none-linux_armv6l.whl", hash = "sha256:fae0805bd514066f20309f6742f6ee7904a773eb9e6c17c45d6b1600ca65c9b5"}, + {file = "ruff-0.8.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b8a4f7385c2285c30f34b200ca5511fcc865f17578383db154e098150ce0a087"}, + {file = "ruff-0.8.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cd054486da0c53e41e0086e1730eb77d1f698154f910e0cd9e0d64274979a209"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2029b8c22da147c50ae577e621a5bfbc5d1fed75d86af53643d7a7aee1d23871"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2666520828dee7dfc7e47ee4ea0d928f40de72056d929a7c5292d95071d881d1"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:333c57013ef8c97a53892aa56042831c372e0bb1785ab7026187b7abd0135ad5"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:288326162804f34088ac007139488dcb43de590a5ccfec3166396530b58fb89d"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b12c39b9448632284561cbf4191aa1b005882acbc81900ffa9f9f471c8ff7e26"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:364e6674450cbac8e998f7b30639040c99d81dfb5bbc6dfad69bc7a8f916b3d1"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b22346f845fec132aa39cd29acb94451d030c10874408dbf776af3aaeb53284c"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b2f2f7a7e7648a2bfe6ead4e0a16745db956da0e3a231ad443d2a66a105c04fa"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:adf314fc458374c25c5c4a4a9270c3e8a6a807b1bec018cfa2813d6546215540"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a885d68342a231b5ba4d30b8c6e1b1ee3a65cf37e3d29b3c74069cdf1ee1e3c9"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d2c16e3508c8cc73e96aa5127d0df8913d2290098f776416a4b157657bee44c5"}, + {file = "ruff-0.8.1-py3-none-win32.whl", hash = "sha256:93335cd7c0eaedb44882d75a7acb7df4b77cd7cd0d2255c93b28791716e81790"}, + {file = "ruff-0.8.1-py3-none-win_amd64.whl", hash = "sha256:2954cdbe8dfd8ab359d4a30cd971b589d335a44d444b6ca2cb3d1da21b75e4b6"}, + {file = "ruff-0.8.1-py3-none-win_arm64.whl", hash = "sha256:55873cc1a473e5ac129d15eccb3c008c096b94809d693fc7053f588b67822737"}, + {file = "ruff-0.8.1.tar.gz", hash = "sha256:3583db9a6450364ed5ca3f3b4225958b24f78178908d5c4bc0f46251ccca898f"}, +] + [[package]] name = "semver" version = "3.0.2" @@ -2015,4 +2043,4 @@ test = ["zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "b0baac3eb7b2e7b3ba939035e02fca84001764b6ce40d0a0bf0cc1fd4e442e85" +content-hash = "c8b2c78df70ab71817b89f0a09a672456017e1598eff4d86fbeeb41dd1dfcfca" diff --git a/docker/qgisserver/pyproject.toml b/docker/qgisserver/pyproject.toml index f213313f26d..5c9851cc624 100644 --- a/docker/qgisserver/pyproject.toml +++ b/docker/qgisserver/pyproject.toml @@ -1,20 +1,5 @@ -[tool.mypy] -python_version = 3.10 -warn_redundant_casts = true -warn_unused_ignores = true -check_untyped_defs = true -skip_version_check = true -ignore_missing_imports = true - -[tool.black] -line-length = 110 -target-version = ['py310'] - -[tool.isort] -profile = "black" -line_length = 110 -known_third_party = "c2cwsgiutils,c2cgeoform,qgis,pytest" -known_first_party = ["geomapfish_qgisserver", "c2cgeoportal_commons"] +[tool.ruff] +target-version = 'py310' [tool.poetry] name = 'c2cgeoportal' @@ -38,7 +23,7 @@ psycopg2 = "2.9.10" pytz = "2024.2" [tool.poetry.dev-dependencies] -prospector = { extras = ["with_mypy", "with_bandit"], version = "1.13.3" } +prospector = { version = "1.13.3", extras = ["with_mypy", "with_bandit", "with_ruff"] } prospector-profile-duplicated = "1.8.0" prospector-profile-utils = "1.13.0" types-pyyaml = "6.0.12.20240917" diff --git a/geoportal/c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/.prospector.yaml b/geoportal/c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/.prospector.yaml index 1123c6f3a0e..fb7d19ccf07 100644 --- a/geoportal/c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/.prospector.yaml +++ b/geoportal/c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/.prospector.yaml @@ -1,30 +1,3 @@ inherits: - duplicated - - utils:no-design-checks - -max-line-length: 110 - -pycodestyle: - options: - max-line-length: 110 - disable: - - E203 - -pylint: - options: - max-line-length: 110 - disable: - - too-many-locals - - too-many-statements - - too-many-branches - - c-extension-no-member - -pyflakes: - disable: - - F401 - -mccabe: - run: false - -bandit: - run: true + - utils:base-less-strict diff --git a/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/pyproject.toml b/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/pyproject.toml index f1c32198485..354842adf7b 100644 --- a/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/pyproject.toml +++ b/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/pyproject.toml @@ -1,7 +1,2 @@ -[tool.black] -line-length = 110 -target-version = ['py39'] - -[tool.isort] -profile = "black" -line_length = 110 +[tool.ruff] +target-version = 'py310' diff --git a/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py b/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py index f9d2305ca39..dd311ef5137 100644 --- a/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py +++ b/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py @@ -61,51 +61,10 @@ def fix_style() -> None: """Fix the style of all the project files using isort, Black and Prettier.""" - - file_to_clean = [] - for filename, content in ( - (".prettierignore", "*.min.js\n"), - ("pyproject.toml", "[tool.black]\nline-length = 110\ntarget-version = ['py39']\n"), - (".prettierrc.yaml", "bracketSpacing: false\nquoteProps: preserve\n"), - ( - ".editorconfig", - """root = true -[*] -max_line_length = 110 -""", - ), - ): - if not os.path.exists(filename): - file_to_clean.append(filename) - if os.path.exists(os.path.join("CONST_create_template", filename)): - shutil.copyfile(os.path.join("CONST_create_template", filename), filename) - else: - with open(filename, "w", encoding="utf8") as file_: - file_.write(content) - - if os.path.exists("ci/config.yaml"): - os.rename("ci/config.yaml", "ci/config.yaml_") if os.path.exists(".pre-commit-config.yaml"): print("Run pre-commit to fix the style.") sys.stdout.flush() subprocess.run(["pre-commit", "run", "--all-files"]) # pylint: disable=subprocess-run-check - else: - print("Run c2cciutils-checks to fix the style.") - sys.stdout.flush() - subprocess.run( # pylint: disable=subprocess-run-check - ["c2cciutils-checks", "--fix", "--check=isort"] - ) - subprocess.run( # pylint: disable=subprocess-run-check - ["c2cciutils-checks", "--fix", "--check=black"] - ) - subprocess.run( # pylint: disable=subprocess-run-check - ["c2cciutils-checks", "--fix", "--check=prettier"] - ) - if os.path.exists("ci/config.yaml_"): - os.rename("ci/config.yaml_", "ci/config.yaml") - - for filename in file_to_clean: - os.remove(filename) def main() -> None: diff --git a/poetry.lock b/poetry.lock index 1c52cffe095..4f8508aeb36 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "affine" @@ -2640,6 +2640,7 @@ pylint-flask = "0.6" pyroma = {version = ">=2.4", optional = true, markers = "extra == \"with-pyroma\" or extra == \"with_everything\""} PyYAML = "*" requirements-detector = ">=1.3.2" +ruff = {version = "*", optional = true, markers = "extra == \"with-ruff\" or extra == \"with_everything\""} setoptconf-tmp = ">=0.3.1,<0.4.0" toml = ">=0.10.2,<0.11.0" @@ -2665,13 +2666,13 @@ files = [ [[package]] name = "prospector-profile-utils" -version = "1.13.0" +version = "1.14.0" description = "Some utility Prospector profiles." optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "prospector_profile_utils-1.13.0-py3-none-any.whl", hash = "sha256:f991f8f2709c5a2c693d0e0a672a8f3ce2db3f1767b4dc2fbe167395c7dbdbb3"}, - {file = "prospector_profile_utils-1.13.0.tar.gz", hash = "sha256:2f98ddda31c0fa024134fe687e9828855f3597ea52de7a710d1aa508de8fda0a"}, + {file = "prospector_profile_utils-1.14.0-py3-none-any.whl", hash = "sha256:15853e984314f90d688052c7dc09c9206779fdfb7f0606f6a4a617d167c6e693"}, + {file = "prospector_profile_utils-1.14.0.tar.gz", hash = "sha256:258bbe70c7411c7c11a7a7fc202c9a021db3d775a3bf45e7e8bd9f96206bcc48"}, ] [package.dependencies] @@ -3967,6 +3968,33 @@ files = [ {file = "ruamel.yaml.clib-0.2.12.tar.gz", hash = "sha256:6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f"}, ] +[[package]] +name = "ruff" +version = "0.8.1" +description = "An extremely fast Python linter and code formatter, written in Rust." +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.8.1-py3-none-linux_armv6l.whl", hash = "sha256:fae0805bd514066f20309f6742f6ee7904a773eb9e6c17c45d6b1600ca65c9b5"}, + {file = "ruff-0.8.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b8a4f7385c2285c30f34b200ca5511fcc865f17578383db154e098150ce0a087"}, + {file = "ruff-0.8.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cd054486da0c53e41e0086e1730eb77d1f698154f910e0cd9e0d64274979a209"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2029b8c22da147c50ae577e621a5bfbc5d1fed75d86af53643d7a7aee1d23871"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2666520828dee7dfc7e47ee4ea0d928f40de72056d929a7c5292d95071d881d1"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:333c57013ef8c97a53892aa56042831c372e0bb1785ab7026187b7abd0135ad5"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:288326162804f34088ac007139488dcb43de590a5ccfec3166396530b58fb89d"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b12c39b9448632284561cbf4191aa1b005882acbc81900ffa9f9f471c8ff7e26"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:364e6674450cbac8e998f7b30639040c99d81dfb5bbc6dfad69bc7a8f916b3d1"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b22346f845fec132aa39cd29acb94451d030c10874408dbf776af3aaeb53284c"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b2f2f7a7e7648a2bfe6ead4e0a16745db956da0e3a231ad443d2a66a105c04fa"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:adf314fc458374c25c5c4a4a9270c3e8a6a807b1bec018cfa2813d6546215540"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a885d68342a231b5ba4d30b8c6e1b1ee3a65cf37e3d29b3c74069cdf1ee1e3c9"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d2c16e3508c8cc73e96aa5127d0df8913d2290098f776416a4b157657bee44c5"}, + {file = "ruff-0.8.1-py3-none-win32.whl", hash = "sha256:93335cd7c0eaedb44882d75a7acb7df4b77cd7cd0d2255c93b28791716e81790"}, + {file = "ruff-0.8.1-py3-none-win_amd64.whl", hash = "sha256:2954cdbe8dfd8ab359d4a30cd971b589d335a44d444b6ca2cb3d1da21b75e4b6"}, + {file = "ruff-0.8.1-py3-none-win_arm64.whl", hash = "sha256:55873cc1a473e5ac129d15eccb3c008c096b94809d693fc7053f588b67822737"}, + {file = "ruff-0.8.1.tar.gz", hash = "sha256:3583db9a6450364ed5ca3f3b4225958b24f78178908d5c4bc0f46251ccca898f"}, +] + [[package]] name = "semver" version = "3.0.2" @@ -4865,4 +4893,4 @@ test = ["zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "7ccfc30f32b7d2dd4599a350c35aea8bda0321ed0831225da7fb247ce3dfa11c" +content-hash = "c7b2c55f651c86d93025cc7ad272652af3e1c7361ecf56e459c6071dbeaebdb0" diff --git a/pyproject.toml b/pyproject.toml index e22e1c6c845..85bb6a8ee36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,25 +1,5 @@ -[tool.mypy] -python_version = "3.10" -warn_redundant_casts = true -warn_unused_ignores = true -warn_return_any = true -ignore_missing_imports = true -disallow_untyped_defs = true -strict_optional = true -strict = true - -[[tool.mypy.overrides]] -module = "c2cgeoportal_admin.*" -disallow_untyped_defs = false - -[tool.black] -line-length = 110 -target-version = ['py310'] - -[tool.isort] -profile = "black" -line_length = 110 -known_local_folder = ["c2cgeoportal_commons", "c2cgeoportal_geoportal", "c2cgeoportal_admin", "geomapfish_qgisserver", "{{cookiecutter.package}}_geoportal"] +[tool.ruff] +target-version = 'py310' [tool.poetry] name = "c2cgeoportal" @@ -75,9 +55,9 @@ azure-storage-blob = "12.24.0" simple_openid_connect = { git = "https://github.com/sbrunner/py_simple_openid_connect.git", branch = "allows-pkce" } # geoportal pkce = '1.0.3' # geoportal basicauth = "1.0.0" -prospector = { extras = ["with_mypy", "with_bandit", "with_pyroma"], version = "1.13.3" } +prospector = { version = "1.13.3", extras = ["with_mypy", "with_bandit", "with_pyroma", "with_ruff"] } prospector-profile-duplicated = "1.8.0" -prospector-profile-utils = "1.13.0" +prospector-profile-utils = "1.14.0" beautifulsoup4 = "4.12.3" [tool.poetry.group.dev.dependencies]