On Tuesday, May 17, 2016 at 2:47:29 PM UTC-5, Edward K. Ream wrote:
 

> So it is worth considerable effort to eliminate all pyflakes complaints. 
> This is usually possible with a bit of effort...warnings that raw_input is 
> undefined (in Python 3) can be suppressed by "fetching" it from the 
> builtins module:
>
> f = builtins.input if g.isPython3 else builtins.raw_input
>     # Suppress pyflakes complaint.
> leoid = f('LeoID: ')
>
> Again, not pretty.  
>

Not just ugly, but buggy.  On Linux, importing builtins will fail in Python 
2. So my code that passed all tests on Windows has just failed several unit 
tests on Linux.

This illustrates the perils of coding to linters. Complete testing is 
required for all such workarounds.  A "solution" on Linux would be to 
import a module called "future", but that would create installation 
problems. This also illustrates how odious the pyflakes refusal to inhibit 
messages can be.  Bugs, courtesy of pyflakes.

It's unbearable to see pyflakes messages that can't be suppressed, so 
something safe and effective must be done. It doesn't have to be pretty, 
however ;-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to