Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: MultiAction.add() return #963

Closed
wants to merge 1 commit into from
Closed

Conversation

mmonfared
Copy link

closes #956

Copy link

linux-foundation-easycla bot commented Feb 23, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mmonfared / name: Mohammad Monfared (6af9c8a)

@@ -45,7 +45,7 @@ def __init__(self, driver: 'WebDriver', element: Optional['WebElement'] = None)
self._element = element
self._touch_actions: List['TouchAction'] = []

def add(self, *touch_actions: 'TouchAction') -> None:
def add(self, *touch_actions: 'TouchAction') -> 'MultiAction':
Copy link
Contributor

Choose a reason for hiding this comment

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

where does it return?

Copy link
Author

@mmonfared mmonfared Feb 23, 2024

Choose a reason for hiding this comment

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

Updated. Just the docstring return value is updated now to align with the method's return value (None). Please check.

Copy link
Contributor

Choose a reason for hiding this comment

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

we plan anyway to remove these endpoints soon, but for the sake of correctness lets have this patch merged

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I'm aware of that. After seeing it in the issues, I thought why not correct it for now.

@KazuCocoa
Copy link
Member

KazuCocoa commented Feb 23, 2024

Maybe proper fix is adding return self at the end (according to the documentation in

| MultiAction(driver).add(a1, a2).perform()
) so that the method can chain calls

@KazuCocoa
Copy link
Member

Thank you, I made #964 to return self. Maybe this is a proper correction

@mmonfared
Copy link
Author

Thank you, I made #964 to return self. Maybe this is a proper correction

This is for sure better, I will close my PR then. Thank you

@mmonfared mmonfared closed this Feb 23, 2024
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.

MultiAction.add() Incorrect Docstring
3 participants