diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 404c85d91..e76c715a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -116,3 +116,10 @@ repos: language: pygrep entry: PyBind|Numpy|Cmake|CCache|Github|PyTest|Mqt|Tum exclude: .pre-commit-config.yaml + + # Check best practices for scientific Python code + - repo: https://github.com/scientific-python/cookie + rev: 2023.11.17 + hooks: + - id: sp-repo-review + additional_dependencies: ["repo-review[cli]"] diff --git a/pyproject.toml b/pyproject.toml index 1eda0ccd0..812fb053f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -157,7 +157,6 @@ files = ["src/mqt", "test/python"] mypy_path = ["$MYPY_CONFIG_FILE_DIR/src"] python_version = "3.8" warn_unused_configs = true -show_error_codes = true enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] strict = true disallow_untyped_defs = false @@ -217,7 +216,7 @@ extend-select = [ "UP", # pyupgrade "YTT", # flake8-2020 ] -extend-ignore = [ +ignore = [ "ANN101", # Missing type annotation for `self` in method "ANN102", # Missing type annotation for `cls` in classmethod "ISC001", # Conflicts with formatter @@ -258,7 +257,7 @@ isort.required-imports = ["from __future__ import annotations"] ] "src/mqt/core/_compat/**.py" = ["TID251"] -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "google"