Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Self to methodNew to Visual Studio Code? Get it now.
Self to method

Self to method

VasyaIT

|
149 installs
| (1) | Free
Automatically adds 'self' as the first argument to methods in Python classes
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

This extension automatically adds self and cls as the first argument to methods in Python classes

Example:

class SomeClass:
    # 'self' added automatically here
    def some_method(self):
        ...

    @classmethod
    # 'cls' added automatically here
    def some_classmethod(cls):
        ...

    @staticmethod
    # nothing will be added here.
    def some_staticmethod():
        ...
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft