Skip to content

Commit 4dc7430

Browse files
authored
fix: upgrade pre-commit hooks for ruff and black and reformated some files acc to new versions (#1073)
1 parent 31c5d22 commit 4dc7430

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
2-
- repo: https://github.com/charliermarsh/ruff-pre-commit
3-
rev: "v0.0.241"
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.4.10
44
hooks:
55
- id: ruff
66
args: [--fix]
77

88
- repo: https://github.com/psf/black
9-
rev: "22.3.0"
9+
rev: 24.4.2
1010
hooks:
1111
- id: black
1212
language_version: python3

app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# ...existing code...
22
from utils.cache import invalidate_cache
33

4+
45
# Add cache reset option when application starts
56
def initialize_app():
67
# ...existing code...

sync-microservice/app/utils/watcher_helpers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ def format_debug_changes(changes: Set[Tuple[Change, str]]) -> str:
2222
change_type = (
2323
"deleted"
2424
if change == Change.deleted
25-
else "modified"
26-
if change == Change.modified
27-
else "added"
25+
else "modified" if change == Change.modified else "added"
2826
)
2927
debug_changes.append(f" - {change_type}: {path}")
3028
indented = "\n".join(" " + line for line in debug_changes)

0 commit comments

Comments
 (0)