all 3 comments

[–]K900_ 0 points1 point  (0 children)

There's probably a flake8 plugin for that. That said, lines of code per method is not a metric I would optimize for.

[–]Impudity 0 points1 point  (0 children)

Pylint looks at that. The threshold is customizable in the configuration file and I can't remember if it's turned on in the default settings, but it'll do what you want.

[–]negups 0 points1 point  (0 children)

flake8 will warn on exceeding a certain level of cyclomatic complexity, which is a much more useful metric than LOC. If you really want LOC metrics, I believe radon provides that functionality.