Skip to content

Commit 3ca6fad

Browse files
committed
linter
1 parent 14280fa commit 3ca6fad

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

codeflash/api/aiservice.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def optimize_python_code( # noqa: D417
101101
trace_id: str,
102102
num_candidates: int = 10,
103103
experiment_metadata: ExperimentMetadata | None = None,
104+
*,
104105
is_async: bool = False,
105106
) -> list[OptimizedCandidate]:
106107
"""Optimize the given python code for performance by making a request to the Django endpoint.

codeflash/code_utils/codeflash_wrap_decorator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def extract_test_context_from_frame() -> tuple[str, str | None, str]:
103103
}
104104
)
105105

106-
except Exception:
107-
pass
106+
except Exception: # noqa: S112
107+
continue
108108

109109
frame = frame.f_back
110110

codeflash/optimization/function_optimizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ def generate_tests_and_optimizations(
983983
self.function_trace_id[:-4] + "EXP0" if run_experiment else self.function_trace_id,
984984
N_CANDIDATES,
985985
ExperimentMetadata(id=self.experiment_id, group="control") if run_experiment else None,
986-
self.function_to_optimize.is_async,
986+
is_async=self.function_to_optimize.is_async,
987987
)
988988
future_candidates_exp = None
989989

@@ -999,7 +999,7 @@ def generate_tests_and_optimizations(
999999
self.function_trace_id[:-4] + "EXP1",
10001000
N_CANDIDATES,
10011001
ExperimentMetadata(id=self.experiment_id, group="experiment"),
1002-
self.function_to_optimize.is_async,
1002+
is_async=self.function_to_optimize.is_async,
10031003
)
10041004
futures.append(future_candidates_exp)
10051005

0 commit comments

Comments
 (0)