Skip to content

Type credentials and OPFS in storage state - #3201

Closed
Shubham Bhardwaj (shubhambhar007) wants to merge 2 commits into
microsoft:mainfrom
shubhambhar007:fix-storage-state-typing
Closed

Shubham Bhardwaj (shubhambhar007) wants to merge 2 commits into
microsoft:mainfrom
shubhambhar007:fix-storage-state-typing

Conversation

@shubhambhar007

Copy link
Copy Markdown

Storage snapshots can include credentials and OPFS entries, but the Python StorageState type rejects both. This adds those optional fields while keeping the existing required origin fields intact, plus a small regression test for the type definitions.

Refs microsoft/playwright#42732

Evidence: the same storage-state example produced two mypy “Extra key” errors before this change and passes after it.

shubhambhardwaj@shubhambhardwaj-mac playwright-python-42732 % ../playwright-typecheck-venv/bin/mypy --no-incremental --follow-imports=normal ../storage_state_typecheck.py
Success: no issues found in 1 source file

I could not run the pytest test locally because the checkout is missing the test harness dependency pixelmatch.

@yury-s

Copy link
Copy Markdown
Member

They are intentionally untyped.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants