Skip to content

Conversation

ki4070ma
Copy link
Collaborator

@ki4070ma ki4070ma commented Nov 3, 2019

For #336

@ki4070ma
Copy link
Collaborator Author

ki4070ma commented Nov 6, 2019

@KazuCocoa @mykola-mokhnach
Can I have your review for package structure in this PR?

Returns:
:obj:`list` of :obj:`appium.webdriver.webelement.WebElement`
:rtype: list of `MobileWebElement`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why rtype is set for some methods and is not set for others?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For auto completion #404.
But I'll remove it if possible after check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it's necessary for auto completion in IDE.

Copy link
Contributor

@mykola-mokhnach mykola-mokhnach Nov 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean can we add rtype to other method declarations to make it consistent?

Copy link
Collaborator Author

@ki4070ma ki4070ma Nov 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, it's unnecessary. (it's confusing us though.)
Originally rtype is unnecessary since Returns: works for auto completion.

https://www.jetbrains.com/help/pycharm/type-syntax-for-docstrings.html

  • reStructuredText(rtype) / Google(Returns:) / and so on

But auto completion doesn't work with Returns: for find_element_xxx somehow.
So added rtype to only find_element_xxx.

Will add one comment to rtype in each class.

@mykola-mokhnach
Copy link
Contributor

@ki4070ma Added some suggestions, but otherwise looks good

@ki4070ma ki4070ma changed the title [WIP] Move search context methods from webdriver and webelement to search_context Move search context methods from webdriver and webelement to search_context Nov 6, 2019
@@ -0,0 +1,43 @@
#!/usr/bin/env python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants