We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a298282 commit 2d88150Copy full SHA for 2d88150
1 file changed
python/google/protobuf/internal/enum_type_wrapper.py
@@ -13,11 +13,20 @@
13
"""
14
15
import sys
16
+from typing import TYPE_CHECKING
17
18
__author__ = 'rabsatt@google.com (Kevin Rabsatt)'
19
20
-class EnumTypeWrapper(object):
21
+if TYPE_CHECKING:
22
+ # EnumTypeWrapper is used as a metaclass during type checking, specifically
23
+ # in the generated stub files.
24
+ base = type
25
+else:
26
+ base = object
27
+
28
29
+class EnumTypeWrapper(base):
30
"""A utility for finding the names of enum values."""
31
32
DESCRIPTOR = None
0 commit comments