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 typos check to pre-commit hooks #10040

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

max-sixty
Copy link
Collaborator

Also fixes a bunch of typos. The work here was adding the exclusions (I had an LLM do them but also checked them)

Also fixes a bunch of typos. The work here was adding the exclusions (I had an LLM do them but also checked them)
@@ -63,6 +57,22 @@ io = [
etc = ["sparse"]
parallel = ["dask[complete]"]
viz = ["cartopy", "matplotlib", "nc-time-axis", "seaborn"]
type-stubs = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had meant to add this in a separate PR; I can do that if folks prefer / we need any discussion on it

@@ -73,3 +73,9 @@ repos:
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]
- repo: https://github.com/crate-ci/typos
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the typos project — it's great in PRQL. There's also a new-ish VSCode extension which has been good

@headtr1ck
Copy link
Collaborator

headtr1ck commented Feb 9, 2025

Does anyone know what is "better", this or codespell #9781?

@max-sixty
Copy link
Collaborator Author

Does anyone know what is "better", this or codespell #9781?

Oh no! I didn't mean to come along with a different version.

I have had a great experience with typos, but have no experience on the comparison.

I guess at least this passes pre-commit? :)

@mathause
Copy link
Collaborator

You could add

[tool.typos.type.jupyter]
extend-ignore-re = [
    "\"id\": \".*\"",
]

to avoid correcting hashes in jupyter notebooks (crate-ci/typos#415 (comment))

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.

3 participants