Skip to content

Commit ae6ab4d

Browse files
committed
fix: resolve mypy no-any-return and pyink formatting errors
1 parent 914fbe1 commit ae6ab4d

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

contributing/samples/gepa/experiment.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from tau_bench.types import EnvRunResult
4444
from tau_bench.types import RunConfig
4545
import tau_bench_agent as tau_bench_agent_lib
46-
4746
import utils
4847

4948

contributing/samples/gepa/run_experiment.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from absl import flags
2626
import experiment
2727
from google.genai import types
28-
2928
import utils
3029

3130
_OUTPUT_DIR = flags.DEFINE_string(

src/google/adk/utils/model_name_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def is_gemini_2_or_above(model_string: Optional[str]) -> bool:
124124
except InvalidVersion:
125125
return False
126126

127-
return parsed_version.major >= 2
127+
return bool(parsed_version.major >= 2)
128128

129129

130130
def is_gemini_3_or_above(model_string: Optional[str]) -> bool:
@@ -143,7 +143,7 @@ def is_gemini_3_or_above(model_string: Optional[str]) -> bool:
143143
if not model_name.startswith('gemini-'):
144144
return False
145145

146-
version_string = model_name[len('gemini-'):].split('-', 1)[0]
146+
version_string = model_name[len('gemini-') :].split('-', 1)[0]
147147
if not version_string:
148148
return False
149149

@@ -152,4 +152,4 @@ def is_gemini_3_or_above(model_string: Optional[str]) -> bool:
152152
except InvalidVersion:
153153
return False
154154

155-
return parsed_version.major >= 3
155+
return bool(parsed_version.major >= 3)

0 commit comments

Comments
 (0)