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 | 6d9294d961ed5338909521dfff8ec5e9c51b20d2 (patch) | |
tree | c4fcefdf62b6077c10c3776505cf8e041759750e /contrib/python | |
parent | e4e76a0c798bd99d223eec2e0970e96fb9c66ca4 (diff) | |
download | ydb-6d9294d961ed5338909521dfff8ec5e9c51b20d2.tar.gz |
Restoring authorship annotation for <dmamylin@yandex-team.ru>. Commit 1 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 eb66f9f6fb..d0960ca438 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 eb66f9f6fb..d0960ca438 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. |