ivankorobkov / python-inject

Python dependency injection
Apache License 2.0
672 stars 77 forks source link

Export Binder #27

Closed wushengjianzong closed 5 years ago

wushengjianzong commented 5 years ago

export Binder in .pyi

T = typing.TypeVar('T')
Binder = typing.TypeVar('Binder')
Injector = typing.TypeVar('Injector')

if we use type-hint in project,

def my_config(binder: Binder):
    binder.bind(Config, load_config_file())
ivankorobkov commented 5 years ago

Hi! I saw your PR, but you have closed it already. Should this issue be also closed?

wushengjianzong commented 5 years ago

Hi! I saw your PR, but you have closed it already. Should this issue be also closed?

I'm sorry! I want to complete it in this weekend, last commit can not solve problem. We should export Injector and Binder in inject.pyi.

ivankorobkov commented 5 years ago

👍

ivankorobkov commented 5 years ago

Done in 3.5.1.