Sitelet https://github.com/appium/python-client/pull/963
Skip to content

fix: MultiAction.add() return - #963

Closed
mmonfared wants to merge 1 commit into
appium:masterfrom
mmonfared:patch-1
Closed

mmonfared wants to merge 1 commit into
appium:masterfrom
mmonfared:patch-1

Conversation

@mmonfared

Copy link
Copy Markdown

closes #956

@linux-foundation-easycla

linux-foundation-easycla Bot commented Feb 23, 2024 •

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

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

Comment thread appium/webdriver/common/multi_action.py Outdated
self._touch_actions: List['TouchAction'] = []

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

Copy link
Copy Markdown
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?

@mmonfared mmonfared Feb 23, 2024 •

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
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.

@mykola-mokhnach
mykola-mokhnach self-requested a review February 23, 2024 12:24
@KazuCocoa

KazuCocoa commented Feb 23, 2024 •

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@mmonfared

Copy link
Copy Markdown
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