Skip to content

Files

Latest commit

 

History

History
29 lines (19 loc) · 549 Bytes

File metadata and controls

29 lines (19 loc) · 549 Bytes

Pattern: Unexpected indentation

Issue: -

Description

A line is indented when it shouldn't be. Usually this will mean that multiple lines need to be indented at the same level.

Example of incorrect code:

In this example, the two print statements do not have matching indentation.

def hello_world():
  print('hello')
    print('world')

Example of correct code:

def hello_world():
    print('hello')
    print('world')

Further Reading