Skip to content

Commit c2c6abb

Browse files
committed
fix: address second-pass gemini-code-assist nits on #4234
Three follow-ups from gemini's second review pass: * Restore the original positional argument order (template_lyt, output_lyt, lef_files, reference_dir, map_files, use_relative_paths) so Python callers that pass the args positionally still work. Prior fix reshuffled `map_files` ahead of `reference_dir`, breaking positional compatibility. * Re-order the Args block in the docstring to match the new signature order. * `map_files` is now `None`-defaulted (to keep the positional-order fix above), so iterate via `map_files or []` rather than dereferencing `None` directly. Signed-off-by: Øyvind Harboe <oyvind@ascenium.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 6a321fa commit c2c6abb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎flow/util/generate_klayout_tech.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def generate_klayout_tech(
3434
template_lyt,
3535
output_lyt,
3636
lef_files,
37-
map_files,
3837
reference_dir=None,
38+
map_files=None,
3939
use_relative_paths=False,
4040
):
4141
"""Generate a klayout .lyt file from a platform template.
@@ -44,10 +44,10 @@ def generate_klayout_tech(
4444
template_lyt: Path to the platform .lyt template file.
4545
output_lyt: Path to write the generated .lyt file.
4646
lef_files: List of LEF file paths to include.
47-
map_files: List of map file paths.
4847
reference_dir: Unused. Accepted for backward compatibility with
4948
callers (e.g. flow/Makefile) that still pass it from when
5049
paths were resolved relative to this directory.
50+
map_files: List of map file paths.
5151
use_relative_paths: Unused. Same backward-compat rationale as
5252
reference_dir -- paths are always written as plain abspath
5353
now, regardless of this flag.
@@ -69,7 +69,7 @@ def generate_klayout_tech(
6969

7070
content = replace_lef_files(content, resolved_lefs)
7171

72-
resolved_maps = [os.path.abspath(f) for f in map_files]
72+
resolved_maps = [os.path.abspath(f) for f in (map_files or [])]
7373
content = replace_map_files(content, resolved_maps)
7474

7575
with open(output_lyt, "w") as f:

0 commit comments

Comments
 (0)