Functions must be less than 200 lines

Metadata

ID: python-code-style/max-function-lines

Language: Python

Severity: Error

Category: Code Style

Description

Ensure that a function is not too long. A function should be less than 100 lines. Otherwise, it’s too long and hard to understand.

Non-Compliant Code Examples

def myfunction():
	foo()
	bar()











	










	










	










	










	










	










	










	










	










	










	










	










	










	










	










	










	










	










	










	
	pass

Compliant Code Examples

def myfunction(args):
	foo()
	bar()
	pass