John Mark Vandenberg added the comment:
pyflakes does assume doctest run with a copy of the module scope.
However when there is an __all__, the module scope as seen by other modules
'should' be only items in __all__. If a doctest is included in documentation,
it 'should' only use names that
R. David Murray added the comment:
I don't understand what the problem is you are trying to solve. Doctests are
designed to run with a copy of the module global scope. If pyflakes does not
understand that, it is a pyflakes bug, but it doesn't sound like that's the
issue. It sounds like you
New submission from John Mark Vandenberg:
Currently doctest.testmod `globals` defaults to including everything in the
module scope, and tools like pyflakes assume that doctests run with globals as
a copy of __dict__ .
It is relatively simple to exclude everything using doctest.testmod(globs={}