mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-17 19:41:25 +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:
1 parent
e2fe224b52
commit
b3b8daed2e
1 file changed
+3
-3
@@ -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