Skip to content

Commit 4447abe

Browse files
migeed-zmeta-codesync[bot]
authored andcommitted
Restore pyright config migration in compare_typecheckers.py
Summary: Modify issue ranker to migrate from pyrefly configs. Reviewed By: grievejia Differential Revision: D99367673 fbshipit-source-id: 4ddb62de572b2c631353bacc5b806851623d6ff2
1 parent ba3e523 commit 4447abe

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

scripts/compare_typecheckers.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,18 @@ def check_project(
591591
_remove_pyrefly_section(pyproject_toml)
592592

593593
if _has_pyright_config(repo_dir):
594+
# Migrate from pyright config for apples-to-apples comparison
594595
logging.info(" Found pyright config, migrating")
596+
run(
597+
f"{pyrefly_bin} init --non-interactive --migrate-from pyright",
598+
debug,
599+
cwd=repo_dir,
600+
shell=True,
601+
)
595602
else:
603+
# No pyright config; default init (uses mypy config if present)
596604
logging.info(" No pyright config, using default init")
597-
run(f"{pyrefly_bin} init", debug, cwd=repo_dir, shell=True)
605+
run(f"{pyrefly_bin} init --non-interactive", debug, cwd=repo_dir, shell=True)
598606

599607
# When full_errors is requested, run pyrefly in JSON mode
600608
output_format = " --output-format json" if full_errors else ""

0 commit comments

Comments
 (0)