Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yarikoptic
Copy link

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

…commit

Centralization of configuration would let use codespell just as is without pre-commit.
Also it seems that new typos were found -- adding one more skip
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@@ -194,3 +194,4 @@ Questions about code are best asked on [gitter](https://gitter.im/lark-parser/Lo
For anything else, I can be reached by email at erezshin at gmail com.

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

Choose a reason for hiding this comment

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

Huh?

Copy link
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
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
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
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
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
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
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!

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