ionelmc / cookiecutter-pylibrary

Enhanced cookiecutter template for Python libraries.
BSD 2-Clause "Simplified" License
1.25k stars 207 forks source link

Remove automodule when running spellcheck. #163

Closed dHannasch closed 5 years ago

dHannasch commented 5 years ago

Also changes the name of the environment variable so it'll be easier to see where it comes from next time someone looks at this code.

This is another way to silence that

WARNING: autodoc: failed to import module 'sampleproject'; the following exception was raised:
No module named 'sampleproject'

It is not necessary to do anything with the testsetup that imports the module, because unlike autodoc, doctest already automatically doesn't do anything if you don't ask for it; the testsetup becomes inert and therefore no import occurs.

ionelmc commented 5 years ago

But having 'source-read' handler just to silence warnings seems wrong in two ways:

Anyway, my proposal is to just remove the spell env. I've just tried it now on hunter it's horrendously cumbersome and broken - I have to whitelist names and things like docstring, backend or subclass. It's pointless really! <= @joaomcteixeira

joaomcteixeira commented 5 years ago

I have to whitelist names and things like docstring, backend or subclass. It's pointless really!

That's true for sure. hehe, I have no objections, go head and remove spellcheck altogether, definitively seems better than going around with complicated fixes just to try to maintain something that, as you said, is harmless and unmaintained.

Truth is that once one understands tox workflow it is easy to add additional checks, and the main template should have only the most general and consistent approaches.