From a8d00a050d3991ffa68960e2dad4adee292e04f9 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Fri, 3 Feb 2023 12:27:49 -0800 Subject: [PATCH 1/2] Update commit hashes in sync-typeshed Also use pyproject.toml instead of README.md because there are fewer pyproject.toml in mypy --- misc/sync-typeshed.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/sync-typeshed.py b/misc/sync-typeshed.py index 8eeb9be7f4f8..1d3cad473734 100644 --- a/misc/sync-typeshed.py +++ b/misc/sync-typeshed.py @@ -24,7 +24,7 @@ def check_state() -> None: - if not os.path.isfile("README.md") and not os.path.isdir("mypy"): + if not os.path.isfile("pyproject.toml") and not os.path.isdir("mypy"): sys.exit("error: The current working directory must be the mypy repository root") out = subprocess.check_output(["git", "status", "-s", os.path.join("mypy", "typeshed")]) if out: @@ -185,9 +185,9 @@ def main() -> None: print("Created typeshed sync commit.") commits_to_cherry_pick = [ - "780534b13722b7b0422178c049a1cbbf4ea4255b", # LiteralString reverts - "5319fa34a8004c1568bb6f032a07b8b14cc95bed", # sum reverts - "0062994228fb62975c6cef4d2c80d00c7aa1c545", # ctypes reverts + "820c46a4d75ec5f6dc95c09845a317ff59c4b4bf", # LiteralString reverts + "af7604de58c4c4952fd51a7556a6c56466113010", # sum reverts + "fe40f814387fc671ba0cc679453b01eabeb7c112", # ctypes reverts ] for commit in commits_to_cherry_pick: subprocess.run(["git", "cherry-pick", commit], check=True) From 16dc27fcb7171675509dd930b653ca9faebb1e38 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Fri, 3 Feb 2023 12:54:50 -0800 Subject: [PATCH 2/2] Update misc/sync-typeshed.py Co-authored-by: Alex Waygood --- misc/sync-typeshed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/sync-typeshed.py b/misc/sync-typeshed.py index 1d3cad473734..98f94bbccd8b 100644 --- a/misc/sync-typeshed.py +++ b/misc/sync-typeshed.py @@ -24,7 +24,7 @@ def check_state() -> None: - if not os.path.isfile("pyproject.toml") and not os.path.isdir("mypy"): + if not os.path.isfile("pyproject.toml") or not os.path.isdir("mypy"): sys.exit("error: The current working directory must be the mypy repository root") out = subprocess.check_output(["git", "status", "-s", os.path.join("mypy", "typeshed")]) if out: