File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
- 3.9.0
1
+ 3.9.1
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ def __eq__(self, other):
109
109
def __hash__ (self ):
110
110
return hash ((self .__class__ , astuple (self )))
111
111
112
- _types = None
112
+ _types = {}
113
113
114
114
@staticmethod
115
115
def types ():
@@ -120,13 +120,12 @@ def types():
120
120
:return: A dictionary of ``Message`` types.
121
121
:rtype: Dict[str,type]
122
122
"""
123
- if Message ._types is None :
124
- Message ._types = {}
125
- classes_to_process = [Message ]
126
- while classes_to_process :
127
- atom = classes_to_process .pop ()
128
- classes_to_process += atom .__subclasses__ ()
129
- Message ._types [atom .__name__ ] = (atom , inspect .getfullargspec (atom .__init__ ).args )
123
+ classes_to_process = [Message ]
124
+ while classes_to_process :
125
+ atom = classes_to_process .pop ()
126
+ classes_to_process += atom .__subclasses__ ()
127
+ Message ._types [atom .__name__ ] = (atom , inspect .getfullargspec (atom .__init__ ).args )
128
+
130
129
return Message ._types
131
130
132
131
You can’t perform that action at this time.
0 commit comments