Loading src/coliverter/certifications/from_dict.py +5 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,11 @@ type ColiCertification = FachschaftCertification certification_classes: Mapping[str, type[ColiCertification]] = { cls.required_office_kind_name: cls for cls in get_args(ColiCertification.__value__) # Unnecessary complex hack. We want to get out all the classes which make up the alias "ColiCertification". # We first need to access the value of the alias (this is either a union or a single type). # If it is a union, then we need get_args to get all the types in the union, otherwise, we just put the # single type in a tuple for consistency. for cls in get_args(ColiCertification.__value__) or (ColiCertification.__value__, ) } Loading Loading
src/coliverter/certifications/from_dict.py +5 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,11 @@ type ColiCertification = FachschaftCertification certification_classes: Mapping[str, type[ColiCertification]] = { cls.required_office_kind_name: cls for cls in get_args(ColiCertification.__value__) # Unnecessary complex hack. We want to get out all the classes which make up the alias "ColiCertification". # We first need to access the value of the alias (this is either a union or a single type). # If it is a union, then we need get_args to get all the types in the union, otherwise, we just put the # single type in a tuple for consistency. for cls in get_args(ColiCertification.__value__) or (ColiCertification.__value__, ) } Loading