fix __metaclass_ references (#2402)

This commit is contained in:
Jelle Zijlstra
2018-09-06 18:24:03 -07:00
committed by Rebecca Chen
parent 19708fac61
commit 9d62d6d5c5
2 changed files with 2 additions and 4 deletions

View File

@@ -8,8 +8,7 @@ class TypeTransformationError(Error): ...
class DescriptorMetaclass(type):
def __instancecheck__(cls, obj): ...
class DescriptorBase:
__metaclass__ = DescriptorMetaclass
class DescriptorBase(metaclass=DescriptorMetaclass):
has_options = ... # type: Any
def __init__(self, options, options_class_name) -> None: ...
def GetOptions(self): ...

View File

@@ -36,8 +36,7 @@ def add_multi_representer(data_type, multi_representer, Dumper=...): ...
class YAMLObjectMetaclass(type):
def __init__(cls, name, bases, kwds) -> None: ...
class YAMLObject:
__metaclass__ = YAMLObjectMetaclass
class YAMLObject(metaclass=YAMLObjectMetaclass):
yaml_loader = ... # type: Any
yaml_dumper = ... # type: Any
yaml_tag = ... # type: Any