Skip to content

Files

Latest commit

 

History

History
26 lines (16 loc) · 536 Bytes

File metadata and controls

26 lines (16 loc) · 536 Bytes

Pattern: Use of one space before inline comment

Issue: -

Description

Inline comments should have two spaces before them. Often programmers will only include one space, which will trigger this warning.

Example of incorrect code:

def print_name(self):
    print(self.name) # This comment needs an extra space

Example of correct code:

def print_name(self):
    print(self.name)  # Comment is correct now

Further Reading