MichaelAquilina / flake8-spellcheck

❄️ Spellcheck variables, classnames, comments, docstrings etc
MIT License
72 stars 28 forks source link

Spellcheck error for common python modules #56

Open FantasticMrFux opened 2 years ago

FantasticMrFux commented 2 years ago

I do get an error for common python modules and their functions.

Example:

import sqlite3
from shutil import copyfile
mattkatz commented 2 years ago

You can add them to one of the dictionary files here in the project.

I wonder if we could just explore all keywords in the base libraries automatically and produce a valid dictionary of all "words" in the standard library.

MichaelAquilina commented 2 years ago

Hello @FantasticMrFux,

As @mattkatz suggested, if you find a word which should be in one of the dictionaries, feel free to open a PR and it to the relevant file.

In this case, it seems like these are missing from https://github.com/MichaelAquilina/flake8-spellcheck/blob/master/flake8_spellcheck/python.txt

aaronzipp commented 2 years ago

Hi @MichaelAquilina, I created a script, for generating a dictionary from a given module, I don't want to open a PR right now, since you need to decide how this will be integrated, but you can take a look at the script here: https://github.com/aaronzipp/flake8-spellcheck/blob/dict-creator/flake8_spellcheck/create_dict.py. The modules to specify could be moved to a YAML file

MichaelAquilina commented 2 years ago

@aaronzipp thanks for pointing me to it. Something like what you just posted will probably be added soon :) I already have something very similar on my local machine.

My main priority for getting something like this in is adding appropriate tests and making sure it's maintainable and easy to read in the long term.