diff --git a/.github/workflows/ruff-check.yml b/.github/workflows/ruff-check.yml index 9dcacbc..d9d1952 100644 --- a/.github/workflows/ruff-check.yml +++ b/.github/workflows/ruff-check.yml @@ -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 diff --git a/spellchecker/spellchecker.py b/spellchecker/spellchecker.py index 53df1fe..b2e208c 100644 --- a/spellchecker/spellchecker.py +++ b/spellchecker/spellchecker.py @@ -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)