divmod-dev team mailing list archive
-
divmod-dev team
-
Mailing list archive
-
Message #00164
[Bug 872503] Re: Pyflakes is unable to recognize string substitution as a use
Is Pyflakes goal to be correct every time it points out an error? Or to
not miss errors within predefined categories?
In the current behavior, Pyflakes flags "used" variables as "unused". If the user replaces locals() with their own function definition they will not get an error. Assuming that locals() refers to the builtin will produce a "sound" error-finder as defined
http://en.wikipedia.org/wiki/Soundness
--
You received this bug notification because you are a member of Divmod-
dev, which is the registrant for Pyflakes.
https://bugs.launchpad.net/bugs/872503
Title:
Pyflakes is unable to recognize string substitution as a use
Status in Pyflakes:
New
Bug description:
See attached program for a trivial example of a common idiom:
"my special string %(with_a_variable)s"%locals()
I wouldn't expect pyflakes to know how to deal with an arbitrary
dictionary in the right hand position, but the use of locals() means
that certain variables are actually used!
To manage notifications about this bug go to:
https://bugs.launchpad.net/pyflakes/+bug/872503/+subscriptions
References