-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py] Addressing mypy type annotation errors #15928
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
base: trunk
Are you sure you want to change the base?
Changes from all commits
2694307
d3cc86a
9687595
9504017
926aafb
42d39fd
e75b8d2
0170770
068833b
fe25da3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,8 @@ | |
class WebDriver(ChromiumDriver): | ||
"""Controls the MSEdgeDriver and allows you to drive the browser.""" | ||
|
||
service: Service | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This class annotation lets mypy understand that the webdriver has an attribute |
||
|
||
def __init__( | ||
self, | ||
options: Optional[Options] = None, | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotation to let mypy know what
log_output
attribute can be. Autodetermination wasn't smart enough to see past the argument annotation which was fine for the argument but incomplete for the attribute.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a real possibility that the argument annotation is incomplete here too. I didn't address this. Someone more familiar with the
log_output
argument should confirm it's annotation.