Fix mypy error with mypy v0.812#590
Merged
ki4070ma merged 3 commits intoappium:dependabot/pip/mypy-approx-eq-0.812from Feb 24, 2021
ki4070ma:fix-mypy
Merged
Fix mypy error with mypy v0.812#590ki4070ma merged 3 commits intoappium:dependabot/pip/mypy-approx-eq-0.812from ki4070ma:fix-mypy
ki4070ma merged 3 commits intoappium:dependabot/pip/mypy-approx-eq-0.812from
ki4070ma:fix-mypy
Conversation
Updates the requirements on [mypy](https://github.com/python/mypy) to permit the latest version. - [Release notes](https://github.com/python/mypy/releases) - [Commits](python/mypy@v0.800...v0.812) Signed-off-by: dependabot[bot] <support@github.com>
|
|
||
| class MobileSwitchTo(SwitchTo): | ||
| def context(self, context_name: str) -> T: | ||
| def context(self, context_name: Optional[str]) -> T: |
Contributor
There was a problem hiding this comment.
why context name is optional?
Collaborator
Author
There was a problem hiding this comment.
It comes from here
Contributor
There was a problem hiding this comment.
it makes sense to mention that in the docstring (e.g. passing None is equal to switching to native context)
| self._addCommands() | ||
|
|
||
| self.error_handler = MobileErrorHandler() | ||
| self._switch_to = MobileSwitchTo(self) |
Contributor
There was a problem hiding this comment.
do we use _switch_to property anywhere else?
Collaborator
Author
There was a problem hiding this comment.
Thanks for your pointing out, I've checked it again, but it isn't used anywhere else.
mykola-mokhnach
approved these changes
Feb 23, 2021
ki4070ma
added a commit
that referenced
this pull request
Feb 24, 2021
* chore(deps): update mypy requirement from ~=0.800 to ~=0.812 Updates the requirements on [mypy](https://github.com/python/mypy) to permit the latest version. - [Release notes](https://github.com/python/mypy/releases) - [Commits](python/mypy@v0.800...v0.812) Signed-off-by: dependabot[bot] <support@github.com> * Fix mypy error with mypy v0.812 (#590) * chore(deps): update mypy requirement from ~=0.800 to ~=0.812 Updates the requirements on [mypy](https://github.com/python/mypy) to permit the latest version. - [Release notes](https://github.com/python/mypy/releases) - [Commits](python/mypy@v0.800...v0.812) Signed-off-by: dependabot[bot] <support@github.com> * fix mypy error * review comment Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mori Atsushi <ki4070ma@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Root cause is that
MobileSwitchTois unreachable whendriver.switch_tois called from checking current behavior by mypy/on IDE.(Also
context@MobileSwithTo doesn't show at IDE(PyCharm) as auto completion)Notes
mypy errors