From c14eb9fd07559251353c4540ed5d97ef065f4994 Mon Sep 17 00:00:00 2001 From: arkuhn Date: Fri, 16 Feb 2024 13:08:34 -0500 Subject: [PATCH] Remove runtime type check --- compiler/cpp/src/thrift/generate/t_py_generator.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/compiler/cpp/src/thrift/generate/t_py_generator.cc b/compiler/cpp/src/thrift/generate/t_py_generator.cc index d7982de27ca..5ece6610c67 100644 --- a/compiler/cpp/src/thrift/generate/t_py_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_py_generator.cc @@ -2590,11 +2590,6 @@ void t_py_generator::generate_serialize_field(ostream& out, t_field* tfield, str * @param prefix String prefix to attach to all fields */ void t_py_generator::generate_serialize_struct(ostream& out, t_struct* tstruct, string prefix) { - if(gen_type_hints_) { - indent(out) << "if not type(" << prefix << ") is " << type_to_py_type(tstruct) - << ": raise ValueError('" << prefix << " is not " << type_to_py_type(tstruct) << "')" << endl; - } - (void)tstruct; indent(out) << prefix << ".write(oprot)" << endl; }