aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/protobuf
diff options
context:
space:
mode:
authordmamylin <dmamylin@yandex-team.ru>2022-02-10 16:49:05 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:05 +0300
commite49a8de0181f81df6c4ba29835a126a8765e6331 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /contrib/python/protobuf
parent6d9294d961ed5338909521dfff8ec5e9c51b20d2 (diff)
downloadydb-e49a8de0181f81df6c4ba29835a126a8765e6331.tar.gz
Restoring authorship annotation for <dmamylin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/protobuf')
-rw-r--r--contrib/python/protobuf/py2/google/protobuf/internal/type_checkers.py4
-rw-r--r--contrib/python/protobuf/py3/google/protobuf/internal/type_checkers.py4
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.