Comment 4 for bug 1589186

Revision history for this message
mforbes (mforbes-physics) wrote :

Again, the reason I am now having an issue is that flake8 adds "E402 module level import not at top of file" which requires the assert statement to come after all the imports breaking locality.

It would be really nice if pyflakes could track the rename of scipy to py, but I think that the best workaround at this point is to del all the unused modules at the end of the import section:

```
import scipy.optimize
import scipy as sp

import numpy.linalg
import numpy as np

...

del scipy, numpy

...
```

Then the statement at least has some meaning - use sp., not scipy. etc. in the code, following conventions.