Skip to content

codespell: move and adjust configuration to pyproject.toml, fix few new typos#1392

Open
yarikoptic wants to merge 3 commits intolark-parser:masterfrom
yarikoptic:enh-codespell
Open

codespell: move and adjust configuration to pyproject.toml, fix few new typos#1392
yarikoptic wants to merge 3 commits intolark-parser:masterfrom
yarikoptic:enh-codespell

Conversation

@yarikoptic
Copy link
Copy Markdown

@yarikoptic yarikoptic commented Feb 14, 2024

Best to have configuration(s) in central place so people could just use codespell without pre-commit

TODOs

  • remove TMP commit with typo after having verified that pre-commit does catch it. If does -- also remove that added workflow

README.md Outdated
For anything else, I can be reached by email at erezshin at gmail com.

-- [Erez](https://github.com/erezsh)
Installating
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the TODOs above ;) it was added explicitly in a commit to see if you do pre-commit checking some how (e.g. via github integration or workflow). Apparently you do, but in a Python type check and not a dedicated workflow.

So in principle I can remove dedicated workflow here OR separate our "Python type check" into two -- 2nd one would just run pre-commit and have a clear/different name. WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would you say are the pros and cons of each approach?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having dedicated codespell action makes it clear/easy to find what failed the CI since name of it (codespell) says it all. When it is bundled in another action (pre-commit) - it not immediately clear. If it is bundled somehow in Python type check then it becomes even misleading.

I personally would have

  • removed codespell action (duplicates what pre-commit does anyways)
  • separated pre-commit into a dedicated workflow: it is expected for it to never fail since it is expected that it would be ran by contributors locally first. And even if it fails -- it is "low priority" since typically only formatting etc aspects, and thus even lower than "Type Checking"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I am not too familiar with the https://pre-commit.ci/ service to advice on that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, one big disadvantage with your proposal is that now instead of only having to run pre-commit, which can run automatically before each commit, contributors would have to run two things, the second one manually. They would only see the error after they open a pull request, instead of seeing it locally when they try to commit.

@MegaIng What do you think?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might be misunderstanding... I added pre-commit for codespell, nothing to be ran manually

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to add new popular typo!

yarikoptic and others added 3 commits March 23, 2026 16:07
… pre-commit

- Added [tool.codespell] section to pyproject.toml with skip patterns
  and ignore-words-list for false positives (nd, iif, ot, datas, foor, re-use)
- Updated pre-commit hook from v2.2.2 to v2.4.2, using pyproject.toml
  config instead of command-line args
- Added tomli dependency for pre-commit hook (needed for Python <3.11)

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

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "uvx codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [
  "docs/_static/sppf/sppf.html"
 ],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@yarikoptic
Copy link
Copy Markdown
Author

ended up mentioning this project, so ran back into my PR here, rebased/refreshed. I think I am done with it , consider adopting or closing. Cheers!

@yarikoptic yarikoptic marked this pull request as ready for review March 23, 2026 20:18
@erezsh
Copy link
Copy Markdown
Member

erezsh commented Mar 23, 2026

Honestly I don't remember what it was about, maybe I misunderstood.

Overall I'm leaning towards merging it. I'm not sure about adding the tomli dependency, so I might remove that part.

Anyway, I hope to get to it soon.

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