Skip to content

Commit d578353

Browse files
style: auto-fix formatting issues
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5060179 commit d578353

6 files changed

Lines changed: 42 additions & 31 deletions

File tree

codeflash/cli_cmds/console.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,16 @@
4545

4646
logging.basicConfig(
4747
level=logging.INFO,
48-
handlers=[RichHandler(rich_tracebacks=True, markup=False, highlighter=NullHighlighter(), console=console, show_path=False, show_time=False)],
48+
handlers=[
49+
RichHandler(
50+
rich_tracebacks=True,
51+
markup=False,
52+
highlighter=NullHighlighter(),
53+
console=console,
54+
show_path=False,
55+
show_time=False,
56+
)
57+
],
4958
format=BARE_LOGGING_FORMAT,
5059
)
5160

codeflash/cli_cmds/logging_config.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ def set_level(level: int, *, echo_setting: bool = True) -> None:
1414

1515
logging.basicConfig(
1616
level=level,
17-
handlers=[RichHandler(rich_tracebacks=True, markup=False, highlighter=NullHighlighter(), console=console, show_path=False, show_time=False)],
17+
handlers=[
18+
RichHandler(
19+
rich_tracebacks=True,
20+
markup=False,
21+
highlighter=NullHighlighter(),
22+
console=console,
23+
show_path=False,
24+
show_time=False,
25+
)
26+
],
1827
format=BARE_LOGGING_FORMAT,
1928
)
2029
logging.getLogger().setLevel(level)
@@ -23,7 +32,14 @@ def set_level(level: int, *, echo_setting: bool = True) -> None:
2332
logging.basicConfig(
2433
format=VERBOSE_LOGGING_FORMAT,
2534
handlers=[
26-
RichHandler(rich_tracebacks=True, markup=False, highlighter=NullHighlighter(), console=console, show_path=False, show_time=False)
35+
RichHandler(
36+
rich_tracebacks=True,
37+
markup=False,
38+
highlighter=NullHighlighter(),
39+
console=console,
40+
show_path=False,
41+
show_time=False,
42+
)
2743
],
2844
force=True,
2945
)

codeflash/languages/java/context.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -887,11 +887,7 @@ def collect_type_identifiers(node: Node) -> None:
887887

888888

889889
def get_java_imported_type_skeletons(
890-
imports: list,
891-
project_root: Path,
892-
module_root: Path | None,
893-
analyzer: JavaAnalyzer,
894-
target_code: str = "",
890+
imports: list, project_root: Path, module_root: Path | None, analyzer: JavaAnalyzer, target_code: str = ""
895891
) -> str:
896892
"""Extract type skeletons for project-internal imported types.
897893
@@ -1011,9 +1007,7 @@ def _extract_constructor_summaries(skeleton: TypeSkeleton) -> list[str]:
10111007
return summaries
10121008

10131009

1014-
def _format_skeleton_for_context(
1015-
skeleton: TypeSkeleton, source: str, class_name: str, analyzer: JavaAnalyzer
1016-
) -> str:
1010+
def _format_skeleton_for_context(skeleton: TypeSkeleton, source: str, class_name: str, analyzer: JavaAnalyzer) -> str:
10171011
"""Format a TypeSkeleton into a context string with method signatures.
10181012
10191013
Includes: type declaration, fields, constructors, and public method signatures

codeflash/languages/java/instrumentation.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,14 @@ def split_var_declaration(stmt_node, source_bytes_ref: bytes) -> tuple[str, str]
731731
# conditionally executed, so an uninitialized declaration would cause
732732
# "variable might not have been initialized" errors.
733733
_PRIMITIVE_DEFAULTS = {
734-
"byte": "0", "short": "0", "int": "0", "long": "0L",
735-
"float": "0.0f", "double": "0.0", "char": "'\\0'", "boolean": "false",
734+
"byte": "0",
735+
"short": "0",
736+
"int": "0",
737+
"long": "0L",
738+
"float": "0.0f",
739+
"double": "0.0",
740+
"char": "'\\0'",
741+
"boolean": "false",
736742
}
737743
default_val = _PRIMITIVE_DEFAULTS.get(type_text, "null")
738744
hoisted = f"{type_text} {name_text} = {default_val};"

codeflash/languages/java/replacement.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,7 @@ def replace_function(
374374
class_name,
375375
)
376376
source = _insert_class_members(
377-
source,
378-
class_name,
379-
new_fields_to_add,
380-
new_helpers_before,
381-
new_helpers_after,
382-
func_name,
383-
analyzer,
377+
source, class_name, new_fields_to_add, new_helpers_before, new_helpers_after, func_name, analyzer
384378
)
385379

386380
# Re-find the target method after modifications

codeflash/verification/parse_line_profile_test_output.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ def show_text(stats: dict) -> str:
8080
return out_table
8181

8282

83-
def show_text_non_python(
84-
stats: dict, line_contents: dict[tuple[str, int], str]
85-
) -> str:
83+
def show_text_non_python(stats: dict, line_contents: dict[tuple[str, int], str]) -> str:
8684
"""Show text for non-Python timings using profiler-provided line contents."""
8785
out_table = ""
8886
out_table += "# Timer unit: {:g} s\n".format(stats["unit"])
@@ -115,11 +113,7 @@ def show_text_non_python(
115113

116114
table_cols = ("Hits", "Time", "Per Hit", "% Time", "Line Contents")
117115
out_table += tabulate(
118-
headers=table_cols,
119-
tabular_data=table_rows,
120-
tablefmt="pipe",
121-
colglobalalign=None,
122-
preserve_whitespace=True,
116+
headers=table_cols, tabular_data=table_rows, tablefmt="pipe", colglobalalign=None, preserve_whitespace=True
123117
)
124118
out_table += "\n"
125119
return out_table
@@ -159,9 +153,7 @@ def parse_line_profile_results(line_profiler_output_file: Optional[Path]) -> dic
159153
line_num = int(line_str)
160154
line_num = int(line_num)
161155

162-
lines_by_file.setdefault(file_path, []).append(
163-
(line_num, int(stats.get("hits", 0)), int(stats.get("time", 0)))
164-
)
156+
lines_by_file.setdefault(file_path, []).append((line_num, int(stats.get("hits", 0)), int(stats.get("time", 0))))
165157
line_contents[(file_path, line_num)] = stats.get("content", "")
166158

167159
for file_path, line_stats in lines_by_file.items():

0 commit comments

Comments
 (0)