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

Extend case insensitivity to submodules/classes #94

Closed dhood closed 8 years ago

dhood commented 8 years ago

As mentioned in https://github.com/PyCQA/flake8-import-order/commit/3f371dded0b19dba24e0287786fc615cfe3624cd, Google and Smarkets should be case insensitive when checking alphabetical ordering. Since https://github.com/PyCQA/flake8-import-order/commit/863f4597ab4e0879ee6058fab3f5e5b1df1f3463, this wasn't the case when from X import Y was being used.

pgjones commented 8 years ago

Thanks, I'll take a look.

dirk-thomas commented 8 years ago

Since this PR didn't reference #80 I didn't find it when going through the history of changes. I will close #95 as a duplicate.

pgjones commented 8 years ago

Thanks you for the pull request.

Whilst reviewing this I realised that the name ordering was missing another condition, namely which of these is correct x, X or X, x. I've fixed this in 5616929de6eede9b5abe05cdb89b64c02c60d253 and then this particular issue in ab53d0fa8e23de11bd572a9cb74d719076fc0ae5 taking into account this additional case.

dirk-thomas commented 8 years ago

That specific case was brought up in https://github.com/PyCQA/flake8-import-order/pull/95#issuecomment-254615686 Thank you for addressing both.

pgjones commented 8 years ago

Oh yea. I think there is one more case which I've addressed in f9b7ebdb67a8ce9c809bc4775b84eff806cc0f0d