99 pass # normal for old versions of typing
1010
1111
12- YT_co = TypeVar ('YT_co ' , bound = 'AbstractYamlObject' )
12+ AYO = TypeVar ('AYO ' , bound = 'AbstractYamlObject' )
1313
1414
1515class AbstractYamlObject (ABC ):
@@ -30,7 +30,7 @@ def to_yaml_dict(self) -> Dict[str, Any]:
3030
3131 @classmethod
3232 @abstractmethod
33- def from_yaml_dict (cls : 'Type[YT_co ]' , dct : Dict , yaml_tag : str ) -> YT_co :
33+ def from_yaml_dict (cls : 'Type[AYO ]' , dct : Dict , yaml_tag : str ) -> AYO :
3434 """
3535 Implementors should transform the given dictionary (read from yaml by the pyYaml stack) into an object instance.
3636 The yaml tag associated to this object, read in the yaml document, is provided in parameter.
@@ -71,7 +71,7 @@ def dumps_yaml(self, **pyyaml_kwargs):
7171 return dump (self , ** pyyaml_kwargs )
7272
7373 @classmethod
74- def loads_yaml (cls : 'Type[YT_co ]' , yaml_str : str ) -> YT_co :
74+ def loads_yaml (cls : 'Type[AYO ]' , yaml_str : str ) -> AYO :
7575 """
7676 Utility method to
7777 :param yaml_str
@@ -80,7 +80,7 @@ def loads_yaml(cls: 'Type[YT_co]', yaml_str: str) -> YT_co:
8080 return cls .load_yaml (StringIO (yaml_str ))
8181
8282 @classmethod
83- def load_yaml (cls : 'Type[YT_co ]' , file_path_or_stream : Union [str , TextIOBase ]) -> YT_co :
83+ def load_yaml (cls : 'Type[AYO ]' , file_path_or_stream : Union [str , TextIOBase ]) -> AYO :
8484 """
8585 Parses the given file path or stream as a yaml document with the
8686
0 commit comments