On Tue, Nov 5, 2013 at 10:28 AM, Jeff Janies <jeff.jan...@redjack.com> wrote:
> I have recently started using Flake8 for syntax checking and have found that 
> the style checking fails to check that `if __name__ == “__main__”:` after a 
> class or function has the correct number of newlines preceding it.  Shouldn’t 
> this follow the same style rules as functions outside of a class?

Hey Jeff!

That may be an issue, I can not remember if the PEP specifies it or
not off the top of my head, but let me give you some context (which
you may already have):

Flake8 wraps around 3 other tools: mccabe, pep8, and pyflakes. The
behaviour you're seeing is coming from the pep8 tool. If PEP-008 (the
document) specifies that this should be the case and using flake8
without any configuration does not warn you, then you should raise an
issue on https://github.com/jcrocholl/pep8

Thanks for bringing this to our attention!

--
Ian
_______________________________________________
code-quality mailing list
code-quality@python.org
https://mail.python.org/mailman/listinfo/code-quality

Reply via email to