Skip to content

[BUG] Don't use implicit-optional for type hints #1460

Closed

Description

Context:

  • Playwright Version: [what Playwright version do you use?] 1.24.0
  • Operating System: [e.g. Windows, Linux or Mac] N/A
  • Python version: [e.g. 3.7, 3.9] 3.10
  • Browser: [e.g. All, Chromium, Firefox, WebKit] N/A
  • Extra: [any specific details about your environment] N/A

Code Snippet

browser.launch(proxy=None)  # mypy error: expected "ProxySettings" found "None"

Describe the bug

proxy: ProxySettings = None,

This should be typed as:

proxy: Optional[ProxySettings] = None,

implicit optional is deprecated(dead in the water 💀🌊)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions