Source lines longer than 79 chars violates PEP8

Issue #1432 resolved
Former user created an issue

Jeepers, Mike, what editor do you use???

Such long lines makes it very hard to read the code on anything that isn't a widescreen projector at a bazillion gigapixels

$ find sqlalchemy -name '*.py' | xargs wc -L | sort -r 514 total 514 sqlalchemy/databases/sybase.py 398 sqlalchemy/databases/information_schema.py 303 sqlalchemy/orm/sync.py 294 sqlalchemy/databases/postgres.py 273 sqlalchemy/databases/oracle.py 267 sqlalchemy/ext/sqlsoup.py 244 sqlalchemy/schema.py 241 sqlalchemy/pool.py 213 sqlalchemy/orm/query.py 176 sqlalchemy/orm/mapper.py 172 sqlalchemy/orm/properties.py 168 sqlalchemy/databases/mysql.py 167 sqlalchemy/util.py 165 sqlalchemy/engine/default.py 164 sqlalchemy/orm/unitofwork.py 161 sqlalchemy/databases/informix.py 158 sqlalchemy/ext/declarative.py 155 sqlalchemy/orm/interfaces.py 155 sqlalchemy/databases/mssql.py 153 sqlalchemy/types.py 147 sqlalchemy/orm/strategies.py 145 sqlalchemy/sql/util.py 145 sqlalchemy/databases/sqlite.py 142 sqlalchemy/orm/dynamic.py 141 sqlalchemy/sql/compiler.py 141 sqlalchemy/databases/firebird.py 138 sqlalchemy/orm/shard.py 135 sqlalchemy/sql/expression.py 135 sqlalchemy/engine/base.py 133 sqlalchemy/orm/dependency.py 131 sqlalchemy/orm/session.py 130 sqlalchemy/databases/access.py 128 sqlalchemy/orm/attributes.py 128 sqlalchemy/exc.py 126 sqlalchemy/ext/compiler.py 125 sqlalchemy/orm/scoping.py 123 sqlalchemy/orm/uowdumper.py 121 sqlalchemy/orm/identity.py 120 sqlalchemy/orm/state.py 119 sqlalchemy/orm/util.py 118 sqlalchemy/orm/evaluator.py 117 sqlalchemy/orm/init.py 114 sqlalchemy/engine/url.py 114 sqlalchemy/engine/threadlocal.py 112 sqlalchemy/topological.py 109 sqlalchemy/sql/visitors.py 106 sqlalchemy/log.py 104 sqlalchemy/orm/collections.py 99 sqlalchemy/interfaces.py 94 sqlalchemy/engine/init.py 92 sqlalchemy/ext/serializer.py 91 sqlalchemy/databases/maxdb.py 88 sqlalchemy/databases/mxODBC.py 87 sqlalchemy/engine/strategies.py 83 sqlalchemy/databases/init.py 83 sqlalchemy/init.py 81 sqlalchemy/queue.py 81 sqlalchemy/ext/orderinglist.py 80 sqlalchemy/sql/functions.py 80 sqlalchemy/ext/associationproxy.py 79 sqlalchemy/orm/exc.py 76 sqlalchemy/sql/operators.py 62 sqlalchemy/sql/init.py 0 sqlalchemy/ext/init.py

Comments (5)

  1. Mike Bayer repo owner

    textmate. patches welcome (for at least 0.6). I do shorten lines as I visit older sections of code. Also I think your method of testing is off - you're just getting the longest line in a file, which may be one of very few lines that is too long. session.py for example only has about 1% of its lines over 79 chars. sybase.py is generally under 100 and I didn't even write that module.

  2. Mike Bayer repo owner

    this is ongoing and I've been generally sticking to 100 characters. if we ever get everything under 100 we can document that we're "pep8 + 100 char lines".

  3. Mike Bayer repo owner

    most of core is under 90 now, would be interesting to get more of a histogram as I'm confident that the vast majority of source lines are under 79 chars. but still much to go.

  4. Mike Bayer repo owner

    ongoing, but per attached the longest line is now 198, most long lines remaining are in older test/ modules, or some docstring lines within lib/. The vast majority of lib/ is now pep8.

  5. Log in to comment