Browse Source

ref: generated Enum type variables must match name (#74799)

this is enforced in mypy 1.11

<!-- Describe your PR here. -->
anthony sottile 7 months ago
parent
commit
a684012536
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/sentry/utils/test_json.py

+ 2 - 2
tests/sentry/utils/test_json.py

@@ -42,8 +42,8 @@ class JSONSerializationTest(TestCase):
         self.assertEqual(json.dumps(res), "null")
 
     def test_enum(self):
-        enum = Enum("foo", "a b c")
-        res = enum.a
+        EnumFoo = Enum("EnumFoo", "a b c")
+        res = EnumFoo.a
         self.assertEqual(json.dumps(res), "1")
 
     def test_translation(self):