fix: fix type checker errors for pyright by ilotoki0804 · Pull Request #1203 · appium/python-client
For a more detailed explanation, please refer to this link.
|
|
||
| from typing import Any, List, Optional, Protocol | ||
| from typing import Any, List, Optional, Protocol, TYPE_CHECKING | ||
| from warings import deprecated |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warings?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opps😅
| # TODO: remove `if not TYPE_CHECKING` guard after properly implement them | ||
| # The use of these methods will produce DeprecationWarnings at runtime | ||
| if not TYPE_CHECKING: | ||
| @deprecated("pin_script is not yet implemented") |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather say is deprecated for removal
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed those methods would be implemented later. If there are no plans to do so, I will make the changes as you suggested.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure it makes sense to implement them in mobile context, but it still makes sense to confirm that with other maintainers
| Appium Python Client: WebDriver module | ||
| """ | ||
|
|
||
| __all__ = ["Remote", "WebElement"] |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks reasonable to me. This fixes mypy --strict also.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lg to me. Waiting for the CI result
KazuCocoa
changed the title
fix: Fix type checker errors
fix: fix type checker errors for pyright
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters