diff options
author | dmamylin <dmamylin@yandex-team.ru> | 2022-02-10 16:49:05 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:05 +0300 |
commit | e49a8de0181f81df6c4ba29835a126a8765e6331 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /contrib/python | |
parent | 6d9294d961ed5338909521dfff8ec5e9c51b20d2 (diff) | |
download | ydb-e49a8de0181f81df6c4ba29835a126a8765e6331.tar.gz |
Restoring authorship annotation for <dmamylin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python')
-rw-r--r-- | contrib/python/protobuf/py2/google/protobuf/internal/type_checkers.py | 4 | ||||
-rw-r--r-- | contrib/python/protobuf/py3/google/protobuf/internal/type_checkers.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/contrib/python/protobuf/py2/google/protobuf/internal/type_checkers.py b/contrib/python/protobuf/py2/google/protobuf/internal/type_checkers.py index d0960ca438..eb66f9f6fb 100644 --- a/contrib/python/protobuf/py2/google/protobuf/internal/type_checkers.py +++ b/contrib/python/protobuf/py2/google/protobuf/internal/type_checkers.py @@ -100,9 +100,9 @@ def GetTypeChecker(field): An instance of TypeChecker which can be used to verify the types of values assigned to a field of the specified type. """ - if (field.cpp_type == _FieldDescriptor.CPPTYPE_STRING and + if (field.cpp_type == _FieldDescriptor.CPPTYPE_STRING and field.type == _FieldDescriptor.TYPE_STRING): - return UnicodeValueChecker() + return UnicodeValueChecker() if field.cpp_type == _FieldDescriptor.CPPTYPE_ENUM: if SupportsOpenEnums(field): # When open enums are supported, any int32 can be assigned. diff --git a/contrib/python/protobuf/py3/google/protobuf/internal/type_checkers.py b/contrib/python/protobuf/py3/google/protobuf/internal/type_checkers.py index d0960ca438..eb66f9f6fb 100644 --- a/contrib/python/protobuf/py3/google/protobuf/internal/type_checkers.py +++ b/contrib/python/protobuf/py3/google/protobuf/internal/type_checkers.py @@ -100,9 +100,9 @@ def GetTypeChecker(field): An instance of TypeChecker which can be used to verify the types of values assigned to a field of the specified type. """ - if (field.cpp_type == _FieldDescriptor.CPPTYPE_STRING and + if (field.cpp_type == _FieldDescriptor.CPPTYPE_STRING and field.type == _FieldDescriptor.TYPE_STRING): - return UnicodeValueChecker() + return UnicodeValueChecker() if field.cpp_type == _FieldDescriptor.CPPTYPE_ENUM: if SupportsOpenEnums(field): # When open enums are supported, any int32 can be assigned. |