-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Consider the following snippet:
# main.py
from playwright.sync_api import Playwright, sync_playwright
def run(playwright: Playwright) -> None:
pixel_2 = playwright.devices["Pixel 2"]
browser = playwright.webkit.launch(headless=False)
context = browser.new_context(
**pixel_2,
)
page = context.new_page()
page.goto("https://github.com")
page.close()
with sync_playwright() as playwright:
run(playwright)Run mypy check on the file with:
mypy main.py --strict --disallow-any-exprIt errors out with error:
❯ mypy main.py --strict --disallow-any-expr
main.py:5: error: Expression type contains "Any" (has type "Dict[Any, Any]")
main.py:5: error: Expression has type "Any"
main.py:8: error: Expression has type "Any"
Found 3 errors in 1 file (checked 1 source file)Reactions are currently unavailable