Skip to content

Add codespell support with configuration and fixes#853

Open
yarikoptic wants to merge 5 commits intoflyteorg:mainfrom
yarikoptic:enh-codespell
Open

Add codespell support with configuration and fixes#853
yarikoptic wants to merge 5 commits intoflyteorg:mainfrom
yarikoptic:enh-codespell

Conversation

@yarikoptic
Copy link
Copy Markdown

Add codespell configuration and fix existing typos.

More about codespell: https://github.com/codespell-project/codespell

I personally introduced it to over a hundred of projects already mostly with a positive feedback
(see the "improveit-dashboard").

CI workflow has 'permissions' set only to 'read' so also should be safe.

Changes

Configuration & Infrastructure

  • Added [tool.codespell] section to pyproject.toml with comprehensive skip patterns
  • Created GitHub Actions workflow (.github/workflows/codespell.yml) to check spelling on push and PRs
  • Configured to skip: .git, .gitignore, .gitattributes, *.lock

Domain-Specific Whitelist

Added legitimate terms that codespell flags as typos:

  • ot — variable name for output type in tests
  • nd — NamedDelivery variable in tests
  • crasher — legitimate word in stress test examples
  • tru — intentional truncated JSON in test fixture
  • nome — timezone name "America/Nome"
  • lits — variable short for "literals"
  • rouge — NLP scoring metric (not "rogue")

Typo Fixes

Ambiguous typos fixed manually (3 fixes with context review):

  • responesresponses (examples/interactive/interactive.ipynb)
  • replacasreplicas (examples/reuse/errors.py, examples/reuse/reusable.py)

Non-ambiguous typos fixed automatically (14 fixes in 10 files):

  • optimialoptimal, ThneThen, handelhandle (×5),
    pre-pendingprepending, infactin fact, agregateaggregate,
    langaugelanguage, orignaloriginal, propogatedpropagated,
    wihtinwithin

Potential Functional Fix

  • handelhandle: renamed method PoetryProjectHandler.handel() and all its call sites — this was a misspelled method name that could cause issues if anyone tried to call .handle() by the correct name.

@yarikoptic got intrigued -- are those tests part of CI at all?

Historical Context

This project has had 10+ prior commits fixing typos manually, demonstrating the value of automated spell-checking.

Testing

Codespell passes with zero errors after all fixes.


🤖 Generated with Claude Code and love to typos free code

yarikoptic and others added 5 commits March 26, 2026 16:56
Added ignore-words-list: ot (output type variable), nd (NamedDelivery variable),
crasher (legitimate word), tru (truncated JSON fixture), nome (timezone),
lits (literals variable), rouge (NLP metric).

Co-Authored-By: Claude Code 2.1.81 / Claude Opus 4.6 <noreply@anthropic.com>
- respones -> responses (examples/interactive/interactive.ipynb)
- replacas -> replicas (examples/reuse/errors.py, examples/reuse/reusable.py)

Co-Authored-By: Claude Code 2.1.81 / Claude Opus 4.6 <noreply@anthropic.com>
Fixed typos:
- optimial -> optimal (examples/advanced/resource_tuner.py)
- Thne -> Then (examples/genai/n8n/README.md)
- handel -> handle (src/flyte/_internal/imagebuild/docker_builder.py, tests)
- pre-pending -> prepending (src/flyte/_internal/imagebuild/utils.py)
- infact -> in fact (src/flyte/_internal/runtime/trigger_serde.py)
- agregate -> aggregate (src/flyte/durable/_time.py)
- langauge -> language (src/flyte/types/__init__.py)
- orignal -> original (src/flyte/types/_type_engine.py)
- propogated -> propagated (src/flyte/types/_type_engine.py)
- wihtin -> within (tests/flyte/imagebuild/test_utils.py)

Co-Authored-By: Claude Code 2.1.81 / Claude Opus 4.6 <noreply@anthropic.com>

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "UV_CACHE_DIR=/tmp/uv-cache uvx codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants