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

Add regex option to run in codespell yml #2851

Closed
jackiekazil opened this issue May 8, 2023 · 3 comments
Closed

Add regex option to run in codespell yml #2851

jackiekazil opened this issue May 8, 2023 · 3 comments
Labels

Comments

@jackiekazil
Copy link

jackiekazil commented May 8, 2023

We ran into the same issue with the jupyter notebooks that other folks have (Re: #2138)
There were four of us at Pycon us 2023 troubling shooting this -- there are a lot of rapid PRs and then reverts around this -- the trail can be found here:

projectmesa/mesa#1661

tldr; You can run a regex on the command line, but the same regex does not work in the codespell.yml and if it does it is not documented, so we didn't know which variable to use... we guessed.

This is the regex that worked on the commandline to basically ignore images & pngs that were in the jupyter notebook

ignore_regex: ^\s*"image\/png":\s.*

And here is an example of the jupyter notebook output that is causing false errors.

Hot take: I don't know that codespell needs to figure out how to solve for jupyter notebooks - that seems like a secondary library that should exist like codespell-notebooks (or something else), but I think the regex that works on the commandline should work in the .yml file.

We got it to work by just ignoring jupyter notebooks in our docs folder:
skip: .*bootstrap.*,*.js,.*bootstrap-theme.css.map,./docs/*.ipynb

Let me know if you have any questions. I hope links I provided makes this and easier fix to navigate.

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented May 8, 2023

What is this codespell.yml file? I don't know anything about it.

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented May 8, 2023

Oh, I get it. This is about the actions-codespell Git Hub Action.

You might want to have a look at issues such as codespell-project/actions-codespell#42 and, if needed, open a new issue here:
https://github.com/codespell-project/actions-codespell/issues

@jackiekazil
Copy link
Author

Thank you. That covers it. I am going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants