Closed ysitu closed 9 years ago
Updated #10 and #3 according to this. So,
from package import module
is appreciated, but
from module import name
is not.
The module should be imported and then items from the module should be used as module.item
.
I think that also includes imports from system packages (e.g., collections
).
Done with the system packages too. Some packages were present in the module unused. I removed them.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/hunter/GSoC/2015/test/tests/test_metis.py", line 36, in test_selfloops
perm, iperm = _metis.node_nd(xadj, adjncy)
File "_metis.pyx", line 356, in _metis.node_nd (_metis.c:4923)
with TemporaryFile() as tmp:
File "_metis.pyx", line 357, in _metis.node_nd (_metis.c:4752)
with redirect(stdout, tmp), nogil:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "_metis.pyx", line 18, in redirect (_metis.c:1206)
fd = source.fileno()
AttributeError: StringIO instance has no attribute 'fileno'
Closed via #3
Follow https://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=Imports#Imports for all Python/Cython source code.