@@ -295,7 +295,7 @@ bool Generator::Generate(const FileDescriptor* file,
295295 PrintFileDescriptor ();
296296 printer_->Print (" _globals = globals()\n " );
297297 if (GeneratingDescriptorProto ()) {
298- printer_->Print (" if _descriptor._USE_C_DESCRIPTORS == False :\n " );
298+ printer_->Print (" if not _descriptor._USE_C_DESCRIPTORS:\n " );
299299 printer_->Indent ();
300300 // Create enums before message descriptors
301301 PrintAllEnumsInFile ();
@@ -322,7 +322,7 @@ bool Generator::Generate(const FileDescriptor* file,
322322 " _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, '$module_name$', "
323323 " _globals)\n " ,
324324 " module_name" , module_name);
325- printer.Print (" if _descriptor._USE_C_DESCRIPTORS == False :\n " );
325+ printer.Print (" if not _descriptor._USE_C_DESCRIPTORS:\n " );
326326 printer_->Indent ();
327327
328328 // Descriptor options may have custom extensions. These custom options
@@ -549,7 +549,7 @@ void Generator::PrintFileDescriptor() const {
549549 m[" options" ] = OptionsValue (proto_.options ().SerializeAsString ());
550550 m[" serialized_descriptor" ] = absl::CHexEscape (file_descriptor_serialized_);
551551 if (GeneratingDescriptorProto ()) {
552- printer_->Print (" if _descriptor._USE_C_DESCRIPTORS == False :\n " );
552+ printer_->Print (" if not _descriptor._USE_C_DESCRIPTORS:\n " );
553553 printer_->Indent ();
554554 // Pure python's AddSerializedFile() depend on the generated
555555 // descriptor_pb2.py thus we can not use AddSerializedFile() when
0 commit comments