pylint woes

Ian Kelly ian.g.kelly at gmail.com
Sun May 8 01:09:18 EDT 2016


On Sat, May 7, 2016 at 9:28 PM, DFS <nospam at dfs.com> wrote:
> But I think there are some pylint bugs here:
> -------------------------------------------------------------------------
>
> standard import "import pyodbc, sqlite3" comes before "import pyodbc,
> sqlite3" (wrong-import-order)
>
>   * complains that the line comes before itself?

I think that it actually wants you to import sqlite3 (a standard
library module) before pyodbc (a third-party module). The message is
confusing because they happen to be on the same line. PEP8 has some
advice on import ordering, which this probably follows.

>
> -------------------------------------------------------------------------
>
> standard import "import re, requests" comes before "import pyodbc, sqlite3"
> (wrong-import-order)
>
>   * So I switched them, and then it complained about that:
>
> standard import "import pyodbc, sqlite3" comes before "import re, requests"
> (wrong-import-order)

Same thing. It wants the re import to come before pyodbc, and it wants
sqlite3 to come before requests.



More information about the Python-list mailing list