Skip to content

Add snippet for Python script boilerplate #2877

@bluthej

Description

@bluthej

This is a feature request which is not related to typing at all, so I hope this is fine!

The LSP spec has support for snippets, which are used e.g. by Rust-Analyzer for its magic completions like tmod to create a test module or tfn to create a test function.

In Python the "standard" boilerplate for a script looks like this:

def main():
    pass


if __name__ == "__main__":
    main()

and it would be cool to have a snippet for that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    completionsBugs or features relating to autocomplete suggestionsserverRelated to the LSP serverwishNot on the current roadmap; maybe in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions