From 9d62d6d5c55057fd7f516c9f4fb7ad792bf7b48a Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 6 Sep 2018 18:24:03 -0700 Subject: [PATCH] fix __metaclass_ references (#2402) --- third_party/2and3/google/protobuf/descriptor.pyi | 3 +-- third_party/2and3/yaml/__init__.pyi | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/third_party/2and3/google/protobuf/descriptor.pyi b/third_party/2and3/google/protobuf/descriptor.pyi index f884219d0..af6071ff5 100644 --- a/third_party/2and3/google/protobuf/descriptor.pyi +++ b/third_party/2and3/google/protobuf/descriptor.pyi @@ -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): ... diff --git a/third_party/2and3/yaml/__init__.pyi b/third_party/2and3/yaml/__init__.pyi index 4a5d2cda5..d6d5425d2 100644 --- a/third_party/2and3/yaml/__init__.pyi +++ b/third_party/2and3/yaml/__init__.pyi @@ -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