Skip to content

Commit b3b8dae

Browse files
authored
Fix import sorting in create_baseline_stubs script (#5781)
Run isort before black since changes made by isort don't follow stub conventions.
1 parent e2fe224 commit b3b8dae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/create_baseline_stubs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def run_black(stub_dir: str) -> None:
6666

6767

6868
def run_isort(stub_dir: str) -> None:
69-
print(f"Running isort: isort --recursive {stub_dir}")
70-
subprocess.run(["isort", "--recursive", stub_dir])
69+
print(f"Running isort: isort {stub_dir}")
70+
subprocess.run(["python3", "-m", "isort", stub_dir])
7171

7272

7373
def create_metadata(stub_dir: str, version: str) -> None:
@@ -150,8 +150,8 @@ def main() -> None:
150150
# Stubs were generated under out/. Copy them to stubs/.
151151
copy_stubs("out", package, stub_dir)
152152

153-
run_black(stub_dir)
154153
run_isort(stub_dir)
154+
run_black(stub_dir)
155155

156156
create_metadata(stub_dir, version)
157157

0 commit comments

Comments
 (0)