Skip to content

Commit b65295c

Browse files
authored
Update parse_eth_gas_report.py
1 parent a048ccf commit b65295c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/externalTests/parse_eth_gas_report.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,11 @@ def to_json(self):
115115

116116

117117
def parse_bool(input_string: str) -> bool:
118-
if input_string == 'true':
119-
return True
120-
elif input_string == 'false':
121-
return True
122-
else:
118+
if input_string not in ('true', 'false'):
123119
raise ValueError(f"Invalid boolean value: '{input_string}'")
124120

121+
return input_string == 'true'
122+
125123

126124
def parse_optional_int(input_string: str, default: Optional[int] = None) -> Optional[int]:
127125
if input_string.strip() == '-':

0 commit comments

Comments
 (0)