I'm doing some refactoring inside of the V8 bindings code generation (all python), and it looks like pylint was recently added to the presubmit checks (
crrev.com/d198da4). pep8 was already there, so now there are *two* linters expressing their opinions about my coding style.
Mostly, they're in agreement, but I'm finding some cases around multi-line statements where it's very difficult to satisfy both of them.
For example, I'm returning a dictionary from a function, like this:
def constant_filters():
return {'has_constant_configuration': filter_has_constant_configuration,
'has_special_getter': filter_has_special_getter,
'runtime_enabled_constants': filter_runtime_enabled,
}
If the closing '}' lines up with the opening '{', then pylint is happy, but pep8 complains:
closing bracket does not match visual indentation [pep8/E124]
If I line the closing bracket up with the opening quote from the previous line, then pep8 is satisfied, but now pylint says:
Wrong continued indentation. [pylint/C0330(bad-continuation)] [5]
Is there a good way to deal with this? I'd rather not have to add "#pylint disable" directives for something like that -- can we just remove pep8 now that pylint is in place? Or make one of them just produce warnings? They're both generating errors now, and git cl upload won't even give me the option to submit anyway.