Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 605 Bytes

File metadata and controls

34 lines (21 loc) · 605 Bytes

Pattern: Use of blank line after function decorator

Issue: -

Description

There should be no blank lines between a function decorator and the function it is decorating.

Example of incorrect code:

In this example, the property decorator has a space between it and the name method. The space should be removed.

class User(object):

    @property

    def name(self):
        pass

Example of correct code:

class User(object):

    @property
    def name(self):
        pass

Further Reading