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

Suggested import sort order is wrong casing. #34

Closed Robpol86 closed 9 years ago

Robpol86 commented 9 years ago

It's convenient that this plugin suggests the correct import order, but it lowercases all of the modules. It would be nice if it didn't do that so I could just copy/paste the correct order.

My incorrect code:

from libnl.linux_private.netlink import NETLINK_ROUTE, NLMSG_LENGTH, NLM_F_DUMP, NLM_F_REQUEST
from libnl.linux_private.rtnetlink import RTA_DATA, RTA_NEXT, RTA_OK, RTM_GETLINK, ifinfomsg, rtgenmsg

Suggested:

./example_list_network_interfaces.py:45:1: I101 Imported names are in the wrong order. Should be netlink_route, nlm_f_dump, nlm_f_request, nlmsg_length
./example_list_network_interfaces.py:46:1: I101 Imported names are in the wrong order. Should be ifinfomsg, rta_data, rta_next, rta_ok, rtgenmsg, rtm_getlink
public commented 9 years ago

Oops yep I should definitely clean that up :)