10000 typeddicts - update conformance tests according to the spec by Andrej730 · Pull Request #1978 · python/typing · GitHub
[go: up one dir, main page]

Skip to content

typeddicts - update conformance tests according to the spec #1978

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
typeddicts - popitem is not allowed
  • Loading branch information
Andrej730 committed Apr 19, 2025
commit 7e462db28079dba483a7e7a88a644fcea1155827
2 changes: 2 additions & 0 deletions conformance/tests/typeddicts_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def func1(variable_key: str):


movie.clear() # E: clear not allowed
movie.popitem() # E: popitem not allowed

del movie["name"] # E: del not allowed for required key

Expand All @@ -60,5 +61,6 @@ class MovieOptional(TypedDict, total=False):
assert_type(movie_optional.get("name"), str | None)

movie_optional.clear() # E: clear not allowed
movie_optional.popitem() # E: popitem not allowed

del movie_optional["name"]
0