File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -487,8 +487,13 @@ def __hash__(self) -> int:
487
487
"builtins.list" , is_unboxed = False , is_refcounted = True , may_be_immortal = False
488
488
)
489
489
490
- # Python dict object (or an instance of a subclass of dict).
490
+ # Python dict object.
491
+ exact_dict_rprimitive : Final = RPrimitive (
492
+ "builtins.dict[exact]" , is_unboxed = False , is_refcounted = True )
493
+ )
494
+
491
495
dict_rprimitive : Final = RPrimitive ("builtins.dict" , is_unboxed = False , is_refcounted = True )
496
+ # An instance of a subclass of dict.
492
497
493
498
# Python set object (or an instance of a subclass of set).
494
499
set_rprimitive : Final = RPrimitive ("builtins.set" , is_unboxed = False , is_refcounted = True )
@@ -599,7 +604,14 @@ def is_list_rprimitive(rtype: RType) -> TypeGuard[RPrimitive]:
599
604
600
605
601
606
def is_dict_rprimitive (rtype : RType ) -> TypeGuard [RPrimitive ]:
602
- return isinstance (rtype , RPrimitive ) and rtype .name == "builtins.dict"
607
+ return isinstance (rtype , RPrimitive ) and rtype .name in (
608
+ "builtins.dict" ,
609
+ "builtins.dict[exact]" ,
610
+ )
611
+
612
+
613
+ def is_exact_dict_rprimitive (rtype : RType ) -> TypeGuard [RPrimitive ]:
614
+ return isinstance (rtype , RPrimitive ) and rtype .name == "builtins.dict[exact]"
603
615
604
616
605
617
def is_set_rprimitive (rtype : RType ) -> TypeGuard [RPrimitive ]:
You can’t perform that action at this time.
0 commit comments