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

application-package-names doesn't work with namespaced packages #124

Closed gilbsgilbs closed 6 years ago

gilbsgilbs commented 6 years ago

Hi,

The application-package-names doesn't seem to work properly with namespaced packages.

E.g.

# flake8-import-order will consider this as a third-party package, and disallow newlines
application-package-names = mynamespace.myproject

This is probably because the root_package_name function considers mynamespace to be the root package name.

https://github.com/PyCQA/flake8-import-order/blob/b563bc958d37b017cb9c79ab85121299bd459137/flake8_import_order/__init__.py#L82

gilbsgilbs commented 6 years ago

Duplicate of https://github.com/PyCQA/flake8-import-order/issues/111 . Sorry.

pgjones commented 6 years ago

Thanks, I think solving #111 will solve this.

pgjones commented 6 years ago

Could you check to see if #126 fixes this?