-
Notifications
You must be signed in to change notification settings - Fork 230
Description
Hi everyone!
I have a simple issue with pylsp, so I was wondering if you could provide context if this is a bug/feature or not. Basically, when I'm writing a function that is decorated, I get a typing suggestion for the decorator, not for the original function. That is not particularly useful when the decorator is mean to act transparently (which I feel is the most common use case for decorators).
For example, while typing some_func(, I see this:
while I would have liked to see that I should pass some_arg to some_func.
Here's simple MRE that reproduces the error:
import functools
@functools.lru_cache()
def some_func(some_arg: int) -> None:
pass
some_func()I'm on https://github.com/helix-editor/helix, but I know this happened also to a coworker which uses vim, which led me to think that it's caused by pylsp itself.
I'm on:
$ pylsp --version
pylsp v1.5.0
$ hx --version
helix 22.12 (96ff64a8)This is my helix config for python, in case it helps:
[[language]]
name = "python"
indent = { tab-width = 4, unit = " " }
[language.config]
# Disable everything but flake8
pylsp.configurationSources = [ 'flake8' ]
pylsp.plugins.flake8.enabled = true
pylsp.plugins.pycodestyle.enabled = false
pylsp.plugins.pyflakes.enabled = false
pylsp.plugins.pylint.enabled = false
pylsp.plugins.mccabe.enabled = falseThanks!
