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

Whitelist names from the standard lib? #43

Open
aileoia opened this issue Dec 12, 2020 · 4 comments
Open

Whitelist names from the standard lib? #43

aileoia opened this issue Dec 12, 2020 · 4 comments

Comments

@aileoia
Copy link

aileoia commented Dec 12, 2020

Hi, thank you so much for this plugin, I'm looking forward to have only existing words as names inside the code (and have an automatic way of forbidding abbreviations).

Currently however, it is nearly impossible to properly use it, at it throws errors at many of the standard library or third party names, e.g. pathlib, joinpath, asdict not mentioning names defined in packages such as numpy, opencv, pillow.

Would there be a way to spellcheck only variables defined in the module to check? Or at least provide a way to whitelist the complete standard library...

Thanks in advance!

@MichaelAquilina
Copy link
Owner

Hi @aileoia ! Those should all be part of python.txt so that they are not reported as spelling errors.

would you like to perhaps open a PR to update the file with what you have found?

@ojomio
Copy link

ojomio commented Jul 14, 2021

I use this snippet to remove the majority of the spellcheck false positives from packages

cat spellcheck_whitelist_in.txt <(python -c 'import sys,pkgutil; [print(i) for i in list(sys.builtin_module_names) + [i.name for i in pkgutil.iter_modules()]]')> spellcheck_whitelist.txt

@MichaelAquilina
Copy link
Owner

@ojomio would you like to try opening a PR that adds those into python.txt?

@ojomio
Copy link

ojomio commented Jul 14, 2021 via email

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

No branches or pull requests

3 participants