Skip to content

Commit

Permalink
Add auto-walrus hook (#7)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
hofbi and pre-commit-ci[bot] authored Aug 6, 2024
1 parent a6a477a commit a22da67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ repos:
rev: v2.3.1
hooks:
- id: autoflake
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: 0.3.4
hooks:
- id: auto-walrus
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
Expand Down
4 changes: 1 addition & 3 deletions dev_tools/check_jira_reference_in_todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ def find_files_with_incorrect_jira_reference_in_todo(files: List[Path]) -> List[


def has_any_file_incorrect_jira_reference_in_todo(files: List[Path]) -> bool:
incorrect_files = find_files_with_incorrect_jira_reference_in_todo(files)

if incorrect_files:
if incorrect_files := find_files_with_incorrect_jira_reference_in_todo(files):
print("\nThe following TODOs do not correspond to the JIRA-Ticket TODO format 'TODO(ABC-1234):':")
for file in incorrect_files:
print(f"{file['file_path']}:{file['line_number']}: error: '{file['line_content']}'")
Expand Down

0 comments on commit a22da67

Please sign in to comment.