Skip to content

Python - add decorator detection #1635

@spectras

Description

@spectras

It would be nice to recognize decorator invocation, eg:

@some.decorator
def foo(bar):
    pass

Decorator invocation can only appear as first token on a line.

This definition should work:

    'decorator': {
        pattern: /(^\s*)@\w+(\.\w+)?/i,
        lookbehind: true
    },

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions