asyncer
asyncer copied to clipboard
Autocompletion doesn't seem to work for PyCharm
First Check
- [X] I added a very descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Asyncer documentation, with the integrated search.
- [X] I already searched in Google "How to X in Asyncer" and didn't find any information.
- [X] I already read and followed all the tutorial in the docs and didn't find an answer.
- [X] I already checked if it is not related to Asyncer but to AnyIO.
- [X] I already checked if it is not related to Asyncer but to Trio.
Commit to Help
- [X] I commit to help with one of those options 👆
Example Code
from datetime import datetime
from asyncer import asyncify
def foobar(x: int, y: 'str') -> datetime:
return datetime(int(y), x, 1)
async def main():
x = await asyncify(foobar)()
Description
asyncer looks awesome yet again. :tada:
Unless I'm missing something(?), I don't seem to get auto-completion help on pycharm.

Might be worth:
- putting a note in the docs about "auto-completion on vscode"
- thinking about a way to get this to work on pycharm - I assume it would require a plugin?
- bugging @pauleveritt about whether pycharm have a plan to add support for stuff like this? - It wouldn't just be for this library, if pycharm could do clever inspection of type hints in decorators, it would open up lots of interesting applications to those of us wedded to pycharm
Operating System
Linux
Operating System Details
Ubuntu 21.04
asyncer Version
0.0.1
Python Version
3.9.5
Additional Context
No response
Pycharm also doesn't recognise the return type as a datetime in my example.
I looked at this earlier today, hoped I could make a video, but found PyCharm couldn't grok it. I'm presuming it is this ticket which is being worked on, but will have to confirm Monday.
Funny enough, I've spent my day fighting and losing at trying to get watchgod and Starlette to play nice.
Ha. I think if you use uvicorn and have watchgod installed, uvicorn uses it in --reload mode.
I'm glad and honored you like it! @samuelcolvin!
Thanks @pauleveritt for chiming in! Great to hear there's a ticket with ongoing work around it!
I imagined having a particular use case for ParamSpec (like this one :sweat_smile:) would probably help to justify allocating internal resources to it, as it's just standard Python anyway and not something particular to this library. :nerd_face:
I'm pretty sure PyCharm will catch up with this particular feature soon (the same way it's leading with other features). I'm not sure about documenting it as if it was a VS Code only thing. :thinking: Also, mypy supports it (in the latest version 0.930 from a couple of weeks ago), and I believe it would show up in PyCharm if the mypy plugin was configured, right?
yes agreed, perhaps something like "on mypy and vscode so far, pycharm support coming soon [link to ticket]"?
FYI, Andrey M has opened a ticket.
I see that the original ticket here https://youtrack.jetbrains.com/issue/PY-50930 says it's fixed, right? :tada:
Sorry for the long delay! 🙈 I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.
Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs.