We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88e27d5 commit b83668eCopy full SHA for b83668e
Lib/test/test_annotationlib.py
@@ -393,15 +393,15 @@ def g(
393
"z": "a[(int, str), 5]",
394
},
395
)
396
-
+
397
def test_set_ordering_consistency(self):
398
"""Test that sets of types are consistently ordered in string representations."""
399
# Test with direct set annotations
400
def g1(x: {int, str}):
401
pass
402
403
anno_g1 = get_annotations(g1, format=Format.STRING)
404
405
# The set should have elements sorted by name (int before str)
406
self.assertEqual(anno_g1["x"], "{int, str}")
407
0 commit comments