Skip to content

Commit

Permalink
use built in ruff github action
Browse files Browse the repository at this point in the history
  • Loading branch information
barrust committed Dec 26, 2024
1 parent a348323 commit a9990fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/ruff-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
# Include `--format=github` to enable automatic inline annotations.
- name: Run Ruff
run: ruff check --output-format=github .
continue-on-error: false
- name: Run Ruff format
run: ruff format --check .
- uses: astral-sh/ruff-action@v2
with:
args: "format --check --output-format github"
continue-on-error: false
8 changes: 4 additions & 4 deletions spellchecker/spellchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def _update_dictionary(self) -> None:
self._total_words = sum(self._dictionary.values())
self._unique_words = len(self._dictionary.keys())
self._letters = set()
for key in self._dictionary:
if len(key) > self._longest_word_length:
self._longest_word_length = len(key)
self._letters.update(key)
for l in self._dictionary:
if len(l) > self._longest_word_length:
self._longest_word_length = len(l)
self._letters.update(l)

0 comments on commit a9990fd

Please sign in to comment.