Skip to content

PyCharm autodetection of trio.* not working #314

@parity3

Description

@parity3

It would be nice if PyCharm could resolve things like trio.run, and pretty much everything else.

In the below code snippet, PyCharm is unable to find run:

import trio

run = trio.run

I don't know how to get around this without either a pre-compile step in the trio package release process (which messes up a ton of other things like line number mappings to the master files for example), or doing a bunch of stubs in trio/__init__.py and having to maintain them. PyCharm MAY have a way to get around this (they have done some magic with Django's ORM in detecting Model.objects.* methods but they have 'built-in' support considering Django is so popular) but I have no idea where to begin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions