Skip to content

Typehinting for IDE suggestions. #10

Description

@laundmo

Hey there,

i love the idea of this library. One issue though: there are no IDE autocomplete suggestions when using this.

I managed to get rudimentary suggestions to work by changing wrap to this:

WrappedT = typing.TypeVar('WrappedT')

def wrap(wrapped: WrappedT, *, previous=None) -> WrappedT:

sadly, this means i have to from fluentpy.wrapper import wrap as _ since type checkers dont understand the concept of a callable module, at least not the way you've done it. on the upside, i get autocomplete suggestions!

Would it be possible to add this to the library, maybe a bit more extensive to be able to see the Wrapper methods like .each? Maybe there's even a way to get it to work with the direct module import?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions