Merge pull request #6482 from ViktorHaag/object-descr-setting-class-type-map-iss6478

Explicitly treat ObjectDescription._doc_field_type_map as an instance variable
This commit is contained in:
Takeshi KOMIYA 2019-06-18 23:04:42 +09:00 committed by GitHub
commit 982f63e4a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,7 @@ class ObjectDescription(SphinxDirective):
def get_field_type_map(self):
# type: () -> Dict[str, Tuple[Field, bool]]
if self._doc_field_type_map == {}:
self._doc_field_type_map = {}
for field in self.doc_field_types:
for name in field.names:
self._doc_field_type_map[name] = (field, False)