Comments (5)
Original comment by 4-launchpad-tim-thechases-com on Launchpad:
from pyflakes.
Original comment by adiroiban (@adiroiban?) on Launchpad:
This is on the TODO list: pyflakes.test.test_imports.Test.test_tryingMultipleImports
from pyflakes.
Original comment by fpinard on Launchpad:
The same duplication warning occurs if one assigns the import name, like in:
try:
import signal
except ImportError:
signal = None
This code comes from a program which sometimes runs under Jython, so it could quickly test if "signal" was available.
François
from pyflakes.
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
from pyflakes.
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:
choice = sys.getenv('CHOICE')
if choice == 'A':
import A as backend
if choice == 'B':
import B as backend
don't work, as expected.
from pyflakes.
Related Issues (20)
- Warn when f-string with non-local variable used? Warn when f-string converting function to str is used? HOT 3
- Errors should be generated for "illegal" accesses to module-level variables with leading double underscores HOT 2
- F821 with Annotated import alias HOT 1
- f-string like f"{foo = }" is detected as an error HOT 1
- Feature request: a rule for calling super().__init__() in custom exception's __init__() HOT 1
- undefined name/syntax error in forward annotation HOT 2
- Use setuptools.build_meta HOT 1
- pyflakes: Does not consider legacy type annotations for "usedness" of imports HOT 2
- F811 redefinition of unused '_' - should underscore be excluded? HOT 1
- Spurious F811 when a method in a class overrides an "unused import" HOT 1
- F821 for PEP695 ParamSpec HOT 3
- Docu: What does pyflake checks for? HOT 2
- False Positive: walrus in a list comprehension HOT 6
- E704 false positives with one line overload def HOT 1
- False-positive F811 HOT 1
- False positive F841 and F821 HOT 5
- pyflakes misses an undefined variable (F821) when a variable is defined in an outer scope, but not in time HOT 4
- Python 3.12: SyntaxError: source code string cannot contain null bytes HOT 2
- F821 undefined name 'something' when using __getitem__ HOT 9
- import * 误报的问题 The issue of import * false positives HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyflakes.