Skip to content

Files

Latest commit

 

History

History
31 lines (21 loc) · 634 Bytes

File metadata and controls

31 lines (21 loc) · 634 Bytes

Pattern: Missing indentation for closing bracket

Issue: -

Description

A closing bracket is missing indentation. This error only occurs if the --hang-closing flag is used, switching the default behavior of closing brackets so that they require hanging indents.

Example of incorrect code:

Note: This is not an anti-pattern by default. This only occurs if the --hang-closing flag is used.

my_list = [
    1, 2, 3,
    4, 5, 6,
]

Example of correct code:

my_list = [
    1, 2, 3,
    4, 5, 6,
    ]

Further Reading