ide integration / language server #347
-
VSCode's Python LSP (pyright) and PyCharm's type analysis don't infer/support some of the features that basedmypy does, so IDE features like auto complete don't work in all cases. This will be a growing issue as more wacky features are added. There is an upstream issue for integrating an LSP which would resolve these issues (although not so easilly for PyCharm, which would require a custom plugin that would proxy to the LSP). Original post@overload
def foo(value: int): ...
@overload
def foo(value: str): ...
def foo(value): # inferred as int | str
value # no ide autocomplete the more features basedmypy gets the bigger of a problem this will become. we need a way for IDEs to support based features some ideas:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
This sounds like a massive work item |
Beta Was this translation helpful? Give feedback.
-
Or a whole separate project (eg if it is writing basedmypy aware plugin/s). There are lots of other IDE integration features that would be useful, like showing errors - #134 (reply in thread). |
Beta Was this translation helpful? Give feedback.
-
this is the solution i went with: https://github.com/detachhead/basedpyright
intellij now supports language servers so we can probably make a pycharm plugin now DetachHead/basedpyright#27 |
Beta Was this translation helpful? Give feedback.
this is the solution i went with: https://github.com/detachhead/basedpyright
intellij now supports language servers so we can probably make a pycharm plugin now DetachHead/basedpyright#27