libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] Kami commented on issue #1306: [WIP] Add Python type annotation for base APIs
Date Wed, 10 Jul 2019 09:12:53 GMT
Kami commented on issue #1306: [WIP] Add Python type annotation for base APIs
URL: https://github.com/apache/libcloud/pull/1306#issuecomment-509980658
 
 
   @tonybaloney ^ maybe you have an idea if we can get type annotations to work for our dynamically
loaded and returned driver classes.
   
   For now, I have this - f5a201637f517c86128ef049314996e3bc97e195. As mentioned above, it's
not ideal since it won't be aware of any provider driver class specific methods and arguments.
   
   I did quite a lot of research and experimentation and I couldn't get it to work (aka annotate
``get_driver`` method that it returns a reference to provider driver class which is dependent
on the value of provided ``provider`` argument constant).
   
   I believe we may only be able to achieve that using a custom MyPy plugin (but I could be
wrong).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message