lark-parser / lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
MIT License
4.88k stars 414 forks source link

Bump pre-commit hooks and add `codespell` hook #1244

Closed kianmeng closed 1 year ago

kianmeng commented 1 year ago

As discussed https://github.com/lark-parser/lark/pull/1242

erezsh commented 1 year ago

Doesn't seem to be working.. I added a comment typo and ran pre-commit run, and codespell passes without any message.

    source_path: Optional[str] # Sxmbol
kianmeng commented 1 year ago

Unfortunately, codespell don't contains that incorrect typo, Sxmbol in its dictionary file. Maybe because it's not that common, https://github.com/search?q=sxmbol&type=code.

If we change the incorrect typo to:

>> 74     source_path: Optional[str] # Symbo

It worked just fine, as shown:

$ pre-commit run --all-files
...
codespell................................................................Failed
- hook id: codespell
- exit code: 65

lark/lark.py:74: symbo ==> symbol
erezsh commented 1 year ago

Sorry for the delay. Thanks for contributing!

kianmeng commented 1 year ago

:partying_face: :partying_face: :partying_face: :partying_face: :partying_face: