@@ -63,7 +63,7 @@ class AbstractYamlObject(six.with_metaclass(ABCMeta, object)):
6363 # raise NotImplementedError("Please override `__to_yaml_scalar__` if you wish to dump instances of `%s`"
6464 # " as yaml scalars." % type(self).__name__)
6565 #
66- # def __to_yaml_sequence__ (self):
66+ # def __to_yaml_list__ (self):
6767 # # type: (...) -> Sequence[Any]
6868 # """
6969 # Implementors should transform the object into a Sequence containing all information necessary to decode the
@@ -72,7 +72,7 @@ class AbstractYamlObject(six.with_metaclass(ABCMeta, object)):
7272 # Default implementation raises an error.
7373 # :return:
7474 # """
75- # raise NotImplementedError("Please override `__to_yaml_sequence__ ` if you wish to dump instances of `%s`"
75+ # raise NotImplementedError("Please override `__to_yaml_list__ ` if you wish to dump instances of `%s`"
7676 # " as yaml sequences." % type(self).__name__)
7777
7878 def __to_yaml_dict__ (self ):
@@ -117,10 +117,10 @@ def __from_yaml_scalar__(cls, # type: Type[Y]
117117 return cls (scalar ) # type: ignore
118118
119119 @classmethod
120- def __from_yaml_sequence__ (cls , # type: Type[Y]
121- seq , # type: Sequence[Any]
122- yaml_tag # type: str
123- ):
120+ def __from_yaml_list__ (cls , # type: Type[Y]
121+ seq , # type: Sequence[Any]
122+ yaml_tag # type: str
123+ ):
124124 # type: (...) -> Y
125125 """
126126 Implementors should transform the given Sequence (read from yaml by the pyYaml stack) into an object instance.
@@ -333,7 +333,7 @@ def read_yaml_node_as_yamlobject(
333333
334334 elif isinstance (node , SequenceNode ):
335335 constructor_args = read_yaml_node_as_sequence (loader , node )
336- return cls .__from_yaml_sequence__ (constructor_args , yaml_tag = yaml_tag ) # type: ignore
336+ return cls .__from_yaml_list__ (constructor_args , yaml_tag = yaml_tag ) # type: ignore
337337
338338 elif isinstance (node , MappingNode ):
339339 constructor_args = read_yaml_node_as_dict (loader , node )
0 commit comments