Skip to content

Commit

Permalink
Added Ruff pre-commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfmanstout committed Oct 26, 2024
1 parent f91b7db commit 40cc63a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: '^.subtrees/(jarowinkler|rapidfuzz)/'
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.1
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
8 changes: 6 additions & 2 deletions gaze_ocr_talon.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def add_homophones(
if homophones_file:
logging.info(f"Found homophones file: {homophones_file}")
else:
logging.warning(f"Could not find homophones.csv. Is knausj_talon installed?")
logging.warning("Could not find homophones.csv. Is knausj_talon installed?")


def get_knausj_homophones():
Expand Down Expand Up @@ -310,7 +310,11 @@ def get_debug_color(has_light_background: bool):


def reset_disambiguation():
global ambiguous_matches, disambiguation_generator, disambiguation_canvas, debug_canvas
global \
ambiguous_matches, \
disambiguation_generator, \
disambiguation_canvas, \
debug_canvas
ambiguous_matches = None
disambiguation_generator = None
hide_canvas = disambiguation_canvas or debug_canvas
Expand Down

0 comments on commit 40cc63a

Please sign in to comment.