libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] c-w commented on issue #1306: Add Python type annotation for base Compute API
Date Fri, 26 Jul 2019 17:02:12 GMT
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

Mime
View raw message