Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️πŸͺ update pre-commit hooks #55

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ repos:

# Python linting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
rev: v0.9.6
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand All @@ -68,7 +68,7 @@ repos:

# Static type checking using mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
rev: v1.15.0
hooks:
- id: mypy
files: ^(src/mqt|tests)
Expand All @@ -86,14 +86,14 @@ repos:

# Format configuration files with prettier
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.4.2
rev: v3.5.0
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]

# Check for spelling
- repo: https://github.com/crate-ci/typos
rev: v1.28.4
rev: typos-dict-v0.12.4
hooks:
- id: typos

Expand All @@ -108,21 +108,21 @@ repos:

# Check best practices for scientific Python code
- repo: https://github.com/scientific-python/cookie
rev: 2024.08.19
rev: 2025.01.22
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]

# Check JSON schemata
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
rev: 0.31.1
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

# Check the pyproject.toml file
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2024.11.25
rev: 2025.02.10
hooks:
- id: validate-pyproject
2 changes: 1 addition & 1 deletion src/mqt/qao/karp/karp_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@ def convert_dict_to_string(dictionary: dict[Any, Any]) -> str:
Returns:
str: Formatted string representation of the dictionary.
"""
result = "Valid Solution" if dictionary.get("Valid Solution", False) else "Invalid Solution"
result = "Valid Solution" if dictionary.get("Valid Solution") else "Invalid Solution"
for key, value in dictionary.items():
if key != "Valid Solution" and isinstance(value, dict):
result += f"\n{key}:"
Expand Down
2 changes: 1 addition & 1 deletion src/mqt/qao/karp/karp_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def check_three_sat_solution(clauses: list[list[str]], solution: dict[str, float
@staticmethod
def convert_dict_to_string(dictionary: dict[str, Any]) -> str:
"""Converts a dictionary of solution validation results into a readable string format."""
result = "Valid Solution" if dictionary.get("Valid Solution", False) else "Invalid Solution"
result = "Valid Solution" if dictionary.get("Valid Solution") else "Invalid Solution"
for key, value in dictionary.items():
if key != "Valid Solution":
result += f"\n{key}:"
Expand Down
2 changes: 1 addition & 1 deletion src/mqt/qao/karp/karp_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ def convert_dict_to_string(dictionary: dict[Any, Any]) -> str:
Returns:
str: A formatted string representation of the validation results.
"""
result = "Valid Solution" if dictionary.get("Valid Solution", False) else "Invalid Solution"
result = "Valid Solution" if dictionary.get("Valid Solution") else "Invalid Solution"

for key, value in dictionary.items():
if key != "Valid Solution" and isinstance(value, dict):
Expand Down
Loading