On Thu, Jan 8, 2015 at 5:15 PM, Björn Dahlgren <[email protected]> wrote:

>
>
>>  > 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.
>

The pyflakes authors want you to use __all__ in __init__.py. You can also
silence unused variable or unused import warnings by putting the variable
on a line by itself, like

import stuff
stuff

will not give any errors.

Aaron Meurer


>
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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
> <https://groups.google.com/d/msgid/sympy/b7259156-865b-442f-b9ac-1dee02c03d4a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAKgW%3D6LR%3DYasmVJJZveNv4WEOsussj4O8JFWa3GRXnHQkVen%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to