-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cascading try/except imports report duplicates #116
Comments
Original comment by 4-launchpad-tim-thechases-com on Launchpad: |
Original comment by adiroiban (@adiroiban?) on Launchpad: This is on the TODO list: pyflakes.test.test_imports.Test.test_tryingMultipleImports |
Original comment by fpinard on Launchpad: The same duplication warning occurs if one assigns the import name, like in: try: This code comes from a program which sometimes runs under Jython, so it could quickly test if "signal" was available. François |
Original comment by saperski on Launchpad: I think I have a fix for this problem for a slightly different fork of pyflakes here: kevinw/pyflakes#28 |
Original comment by zbyszek-in on Launchpad: Tested this on multi-import from http://lxml.de/tutorial.html and it seems to work well. OTOH, stuff like: if choice == 'B': don't work, as expected. |
Original report by 4-launchpad-tim-thechases-com on Launchpad:
With the attached example file, pyflakes reports
pf.py:6: redefinition of unused 'connect' from line 3
pf.py:6: redefinition of unused 'PARSE_DECLTYPES' from line 3
pf.py:6: redefinition of unused 'PARSE_COLNAMES' from line 3
They're not redefinitions, but fallbacks in case defining them the first time fails. I don't know if there's a way to catch this, but it's worth noting.
The text was updated successfully, but these errors were encountered: