beeware / toga

A Python native, OS native GUI toolkit.

Home Page:https://toga.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace codespell global ignore with line-specific ignores

freakboy3742 opened this issue · comments

Describe the bug

The top-level pyproject.toml includes a codespell configuration that adds a global ignore-words-list. This is because codespell is incorrectly identifying some words as misspellings. Ideally, we'd use a per-usage ignore, rather than a global ignore.

This was logged as codespell-project/codespell#1212, which was implemented as codespell-project/codespell#2400. We should use the new feature in Toga.

Steps to reproduce

  1. Disable the ignore-words-list configuration in the top level pyproject.toml
  2. Run pre-commit run --all

Expected behavior

Pre-commit should pass the codespell test without error.

Screenshots

No response

Environment

Pre-commit/CI.

Logs


Additional context

Our codespell dependency is set at v2.2.6 at time of writing. When a new version of codespell is released, our pre-commit update task will automatically upgrade the version, at which point we can replace the ignore-words-list global config with per-line ignores (e.g., # codespell:ignore crate)for the specific places where there is a problem.