You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2019/07/26 17:02:12 UTC

[GitHub] [libcloud] c-w commented on issue #1306: Add Python type annotation for base Compute API

c-w commented on issue #1306: Add Python type annotation for base Compute API
URL: https://github.com/apache/libcloud/pull/1306#issuecomment-515527976
 
 
   @Kami I'm not sure this is currently possible in mypy since we only know the type of the returned driver value at runtime based on the provider argument.
   
   The current approach looks good to me and may even encourage more users to stick to the methods defined in the base API (a win in my mind since it'll make code more easily cross-cloud portable). We do lose mypy coverage for any `ex_` methods, but if a user has code that relies on those, they can always work around it like this:
   
   ```py
   driver: MySpecificDriver = get_driver(...)
   ```

----------------------------------------------------------------
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