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 2020/01/17 22:48:00 UTC

[GitHub] [libcloud] dpeschman opened a new issue #1413: mypy issues as of 2.8.0

dpeschman opened a new issue #1413: mypy issues as of 2.8.0
URL: https://github.com/apache/libcloud/issues/1413
 
 
   ## Summary
   Just wanted to feed back to you all a couple issues we had running mypy on our custom drivers after upgrading to libcloud 2.8.0.
   
   ## Detailed Information
   - The type of NodeDriver.type is Provider, but our custom drivers assign a string to this field which cause a mypy error.  Perhaps it should be Union[Provider, str]? 
   - NodeSize, NodeLocation, and NodeImage have driver typed to be Type[NodeDriver] in their constructors, but this does not match Node, StorageVolume, and others which have it typed as NodeDriver.  We have subclasses of some of these and use self.driver as an instance of a driver, just like the Node class, and not as a driver class.

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

[GitHub] [libcloud] Kami closed issue #1413: mypy issues as of 2.8.0

Posted by GitBox <gi...@apache.org>.
Kami closed issue #1413: mypy issues as of 2.8.0
URL: https://github.com/apache/libcloud/issues/1413
 
 
   

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

[GitHub] [libcloud] Kami edited a comment on issue #1413: mypy issues as of 2.8.0

Posted by GitBox <gi...@apache.org>.
Kami edited a comment on issue #1413: mypy issues as of 2.8.0
URL: https://github.com/apache/libcloud/issues/1413#issuecomment-576128520
 
 
   @dpeschman Thanks for reporting this issue, we will have a look.
   
   As far as adding ``**kwargs`` goes - I don't think it should be part of the standard API. The whole point behind the standard API is so you know up front which arguments are available and supported.
   
   Drivers can still use it, but even there explicitly declaring supported arguments is preferred and there are usually very few valid cases for using ``**kwargs`` (recent improvements related to that - #1389).
   
   ---
   
   EDIT: On a related noted - do you have a specific / valid use case for ``**kwargs`` in mind?

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

[GitHub] [libcloud] dpeschman commented on issue #1413: mypy issues as of 2.8.0

Posted by GitBox <gi...@apache.org>.
dpeschman commented on issue #1413: mypy issues as of 2.8.0
URL: https://github.com/apache/libcloud/issues/1413#issuecomment-576758869
 
 
   Our use case is that our custom drivers take additional/other parameters to create_node that aren't in the base API.  But I see your point about using explicit keyword args and will update our drivers to do that and continue to ignore the mypy/lint arg mismatch in this case.

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

[GitHub] [libcloud] Kami commented on issue #1413: mypy issues as of 2.8.0

Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1413: mypy issues as of 2.8.0
URL: https://github.com/apache/libcloud/issues/1413#issuecomment-576128520
 
 
   @dpeschman Thanks for reporting this issue, we will have a look.
   
   As far as adding ``**kwargs`` goes - I don't think it should be part of the standard API. The whole point behind the standard API is so you know up front which arguments are available and supported.
   
   Drivers can still use it, but even there explicitly declaring supported arguments is preferred and there are usually very few valid cases for using ``**kwargs`` (recent improvements related to that - #1389).

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

[GitHub] [libcloud] dpeschman commented on issue #1413: mypy issues as of 2.8.0

Posted by GitBox <gi...@apache.org>.
dpeschman commented on issue #1413: mypy issues as of 2.8.0
URL: https://github.com/apache/libcloud/issues/1413#issuecomment-575826135
 
 
   Forgot one more - what do you think about adding **kwargs back to create_node?

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