Skip to content

Commit

Permalink
✨ add sp-repo-review to pre-commit check (#355)
Browse files Browse the repository at this point in the history
## Description

This PR adds a new pre-commit check that runs Scientific Python's Repo
Review and checks for the use of established best practices throughout
the project.

Adding the check immediately revealed the use of some deprecated
settings.

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.

Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer committed Feb 23, 2024
1 parent df89bc2 commit a76caa6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,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: 2024.01.24
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ report.exclude_also = [
files = ["src/mqt", "test/python"]
mypy_path = ["$MYPY_CONFIG_FILE_DIR/src"]
python_version = "3.8"
#strict = true
show_error_codes = true
strict = false
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
explicit_package_bases = true
Expand Down Expand Up @@ -214,7 +213,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
Expand Down

0 comments on commit a76caa6

Please sign in to comment.