Closed DanCardin closed 8 years ago
Not sure what's up with your first example. This is what I get when I sort them:
import datetime
import flask
import dateutil
Which looks correct to me. datetime
is a builtin. The other two are third party, but orphans/loners so are grouped together.
So, your main issue is that scripts that only contain imports shouldn't have a blank line at the end of the file? I think I can fix that easily.
Woops, no idea why I said datetime was a third party lib, but it looks like dateutil was an issue with my virtualenv or something because a fresh env fixed it. weird!
So starting with the imports:
I get
Which I'm not sure what's up with that. All three should be 3rd party libs which get grouped together. (plus in getting together this example, I noticed imports by themselves in a file adds an unnecessary newline at the EOF)
Secondarily
Correctly sorts by, by doing nothing (including no newline at the EOF), but
sorts to (again, newline EOF)