> > > Also there can be false positives, > > because a function can be imported just so that it can be recursively > > imported from that same module. At best, you have to ignore __init__.py > > files. > > That's the stuff that gets re-exported up to the sympy module itself, so > that it is available to the SymPy user, right? > > Just wanted to mention that that there is pytest-flakes and pytest-pep8 on PyPI if SymPy ever switches to depending on pytest externally. Pyflakes lack a way to indicate that an unused import is intentional (for e.g. try/except ImportError <http://stackoverflow.com/questions/5033727>). For pytest-flakes you can add ignore patterns to e.g. setup.cfg.
There is also flake8 which enables you to via comments to ignore warnings on a per line basis. And there are extensions to flake8 (e.g. https://github.com/openstack-dev/hacking). -But, IMHO I think it is very easy to go a bit overboard with these things. (starting a new project with automatic tests from day 1 is another story..) -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/b7259156-865b-442f-b9ac-1dee02c03d4a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.