About linters and PEP-8

Pavol Lisy pavol.lisy at gmail.com
Sun Mar 19 04:24:52 EDT 2017


On 3/19/17, Chris Angelico <rosuav at gmail.com> wrote:
> On Sun, Mar 19, 2017 at 4:53 PM, Pavol Lisy <pavol.lisy at gmail.com> wrote:

>> In case of spaces there is not discrepancy. pep8 and similar linters
>> could work fine without incompatible configurations.

> I don't like the pep8 tool; its name implies far more authority than
> it actually has. But if you look at the rules Python 3 applies, or
> Python 2 with "-tt", you should easily be able to comply.

There was discussion on python-idea about duplicity in dict definition.

   {"a": "foo", "a": "bar"}

Conclusion was that it is not an error and anybody could use linters
for finding it. For example pylint could do it. Modern editors could
do linting parallel to editing and many people use it.

I think - I couldn't like everything what pep8 or pylint or any others
do. But it is some kind of responsibility to write codes, which do not
produce plenty of warnings. (because they could hide warning like
duplicity in dict)

And I think that significance of linters could grow as machine
learning will evolve. So if there is something wrong about PEP-8 maybe
there is some work for us to improve it.

PL.


More information about the Python-list mailing list