A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/protocolbuffers/protobuf/commit/69724647ea60c41713b194e0893cc8dce85a056a below:

Change Python .pyi stubs to generated _Optional[] for bool fields sam… · protocolbuffers/protobuf@6972464 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+2

-9

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+2

-9

lines changed Original file line number Diff line number Diff line change

@@ -522,10 +522,7 @@ void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,

522 522

std::string field_name = std::string(field_des->name());

523 523

printer_->Print(", $field_name$: ", "field_name", field_name);

524 524

Annotate("field_name", field_des);

525 -

if (field_des->is_repeated() ||

526 -

field_des->cpp_type() != FieldDescriptor::CPPTYPE_BOOL) {

527 -

printer_->Print("_Optional[");

528 -

}

525 +

printer_->Print("_Optional[");

529 526

if (field_des->is_map()) {

530 527

const Descriptor* map_entry = field_des->message_type();

531 528

printer_->Print(

@@ -557,11 +554,7 @@ void PyiGenerator::PrintMessage(const Descriptor& message_descriptor,

557 554

printer_->Print("]");

558 555

}

559 556

}

560 -

if (field_des->is_repeated() ||

561 -

field_des->cpp_type() != FieldDescriptor::CPPTYPE_BOOL) {

562 -

printer_->Print("]");

563 -

}

564 -

printer_->Print(" = ...");

557 +

printer_->Print("] = ...");

565 558

}

566 559

if (has_python_keywords) {

567 560

printer_->Print(", **kwargs");

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4