Skip to content

Commit 12f9c3c

Browse files
committed
Apply suggestions from code review
1 parent eaaf880 commit 12f9c3c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Tools/cases_generator/generators_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
ROOT = Path(__file__).parent.parent.parent
21-
DEFAULT_INPUT = (ROOT / "Python/bytecodes.c").absolute()
21+
DEFAULT_INPUT = (ROOT / "Python/bytecodes.c").absolute().as_posix()
2222

2323

2424
def root_relative_path(filename: str) -> str:

Tools/cases_generator/tier1_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def generate_tier1(
184184
if __name__ == "__main__":
185185
args = arg_parser.parse_args()
186186
if len(args.input) == 0:
187-
args.input.append(DEFAULT_INPUT.as_posix())
187+
args.input.append(DEFAULT_INPUT)
188188
data = analyze_files(args.input)
189189
with open(args.output, "w") as outfile:
190190
generate_tier1(args.input, data, outfile, args.emit_line_directives)

Tools/cases_generator/uop_id_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
DEFAULT_OUTPUT = ROOT / "Include/internal/pycore_uop_ids.h"
2525

2626

27-
OMIT = { "_CACHE", "_RESERVED", "_EXTENDED_ARG" }
27+
OMIT = {"_CACHE", "_RESERVED", "_EXTENDED_ARG"}
2828

2929
def generate_uop_ids(
3030
filenames: str, analysis: Analysis, outfile: TextIO, distinct_namespace: bool
@@ -52,7 +52,7 @@ def generate_uop_ids(
5252
for uop in analysis.uops.values():
5353
if uop.name in PRE_DEFINED:
5454
continue
55-
# We should omit all tier-1 only uops, but
55+
# TODO: We should omit all tier-1 only uops, but
5656
# generate_cases.py still generates code for those.
5757
if uop.name in OMIT:
5858
continue
@@ -91,7 +91,7 @@ def generate_uop_ids(
9191
if __name__ == "__main__":
9292
args = arg_parser.parse_args()
9393
if len(args.input) == 0:
94-
args.input.append(DEFAULT_INPUT.as_posix())
94+
args.input.append(DEFAULT_INPUT)
9595
data = analyze_files(args.input)
9696
with open(args.output, "w") as outfile:
9797
generate_uop_ids(args.input, data, outfile, args.namespace)

0 commit comments

Comments
 (0)