Skip to content

Files

Latest commit

 

History

History
35 lines (24 loc) · 691 Bytes

File metadata and controls

35 lines (24 loc) · 691 Bytes

Pattern: Indentation contains tabs

Issue: -

Description

Indentation has tabs when only spaces are expected. Change all tabs to spaces.

Example of incorrect code:

Note: represents a tab.

def get_name(self):
    if self.first_name and self.last_name:
    → → return self.first_name + ' ' + self.last_name
    else:
        return self.last_name

Example of correct code:

Use spaces only.

def get_name(self):
    if self.first_name and self.last_name:
        return self.first_name + ' ' + self.last_name
    else:
        return self.last_name

Further Reading