mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Fix import sorting in create_baseline_stubs script (#5781)
Run isort before black since changes made by isort don't follow stub conventions.
This commit is contained in:
@@ -66,8 +66,8 @@ def run_black(stub_dir: str) -> None:
|
||||
|
||||
|
||||
def run_isort(stub_dir: str) -> None:
|
||||
print(f"Running isort: isort --recursive {stub_dir}")
|
||||
subprocess.run(["isort", "--recursive", stub_dir])
|
||||
print(f"Running isort: isort {stub_dir}")
|
||||
subprocess.run(["python3", "-m", "isort", stub_dir])
|
||||
|
||||
|
||||
def create_metadata(stub_dir: str, version: str) -> None:
|
||||
@@ -150,8 +150,8 @@ def main() -> None:
|
||||
# Stubs were generated under out/. Copy them to stubs/.
|
||||
copy_stubs("out", package, stub_dir)
|
||||
|
||||
run_black(stub_dir)
|
||||
run_isort(stub_dir)
|
||||
run_black(stub_dir)
|
||||
|
||||
create_metadata(stub_dir, version)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user