pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Add support for create function, class or parameter code actions depending on context

Open judej opened this issue 1 year ago • 3 comments

Discussed in https://github.com/microsoft/pylance-release/discussions/3600

Originally posted by luabud November 9, 2022

It'd be nice Pylance could displayed refactoring code actions depending on the context. For example:


def foo():
    return x  # <--- 💡Create parameter x

a = MyClass # <--- 💡 Create class MyClass

b = bla() # <---- 💡 Create method bla()



```</div>

judej avatar Jan 18 '24 22:01 judej

we just converted this into an issue to add it to our roadmap

luabud avatar Jan 18 '24 22:01 luabud

Related on Stack Overflow: Create non-existent functions by a single click in VS Code Python.

Does this also cover missing methods? (see also VS Code assist for Python create new method if they not exists?)

starball5 avatar Jan 19 '24 00:01 starball5