PyCQA / flake8-import-order

Flake8 plugin that checks import order against various Python Style Guides
GNU Lesser General Public License v3.0
278 stars 72 forks source link

Does import order consider case? #40

Closed mauricioabreu closed 9 years ago

mauricioabreu commented 9 years ago

Example:

Imported names are in the wrong order. Should be RequestContext, get_object_or_404, render, render_to_response

It looks like RequestContext should be in the first position because it is upper case. Am I right? If yes I can update cryptography example and add a line considering case sensitive imports.

Thanks! (sorry for using issues to make a question)

public commented 9 years ago

Yeah it does count case. It uses plain lexical order with no locale magic so upper-case comes first.

I should probably make sure the tests cover this case too :)

mauricioabreu commented 9 years ago

I am curious: do you like this behavior? Don't get me wrong. I am just trying to understand your opinion.

Thanks for this library! :-)

untitaker commented 9 years ago

I like this behavior because it separates classes from functions during imports.