File tree Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change @@ -500,35 +500,6 @@ def field_type(self) -> str:
500
500
.replace ("type_" , "" )
501
501
)
502
502
503
- @property
504
- def default_value_string (self ) -> str :
505
- """Python representation of the default proto value."""
506
- if self .repeated :
507
- return "[]"
508
- if self .optional :
509
- return "None"
510
- if self .py_type == "int" :
511
- return "0"
512
- if self .py_type == "float" :
513
- return "0.0"
514
- elif self .py_type == "bool" :
515
- return "False"
516
- elif self .py_type == "str" :
517
- return '""'
518
- elif self .py_type == "bytes" :
519
- return 'b""'
520
- elif self .field_type == "enum" :
521
- enum_proto_obj_name = self .proto_obj .type_name .split ("." ).pop ()
522
- enum = next (
523
- e
524
- for e in self .output_file .enums
525
- if e .proto_obj .name == enum_proto_obj_name
526
- )
527
- return enum .default_value_string
528
- else :
529
- # Message type
530
- return "None"
531
-
532
503
@property
533
504
def packed (self ) -> bool :
534
505
"""True if the wire representation is a packed format."""
@@ -687,14 +658,6 @@ def __post_init__(self) -> None:
687
658
]
688
659
super ().__post_init__ () # call MessageCompiler __post_init__
689
660
690
- @property
691
- def default_value_string (self ) -> str :
692
- """Python representation of the default value for Enums.
693
-
694
- As per the spec, this is the first value of the Enum.
695
- """
696
- return str (self .entries [0 ].value ) # ideally, should ALWAYS be int(0)!
697
-
698
661
699
662
@dataclass
700
663
class ServiceCompiler (ProtoContentBase ):
You can’t perform that action at this time.
0 commit comments