Update pronouns.py

This commit is contained in:
InspectorCaracal 2022-10-10 12:24:30 -06:00 committed by GitHub
parent 57a077ff24
commit e129e5682c

View file

@ -407,15 +407,8 @@ def pronoun_to_viewpoints(
# step down into the mapping
viewpoint_map = PRONOUN_MAPPING[viewpoint]
if pronoun_type in viewpoint_map:
pronouns = viewpoint_map[pronoun_type]
else:
pronouns = viewpoint_map[DEFAULT_PRONOUN_TYPE]
if gender in pronouns:
mapped_pronoun = pronouns[gender]
else:
mapped_pronoun = pronouns[DEFAULT_GENDER]
pronouns = viewpoint_map.get(pronoun_type) or viewpoint_map.get(DEFAULT_PRONOUN_TYPE)
mapped_pronoun = pronouns.get(gender) or pronouns.get(DEFAULT_GENDER)
# keep the same capitalization as the original
if pronoun != "I":