Skip to content

[Backport 8.x] Reduce the number of black and isort calls #2795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions utils/run-unasync-dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ def main(check=False):
filepaths.append(os.path.join(root, filename))

unasync.unasync_files(filepaths, rules)
output_dirs = []
for dir in source_dirs:
output_dir = f"{dir[0]}_sync_check/" if check else dir[1]
subprocess.check_call(["black", "--target-version=py38", output_dir])
subprocess.check_call(["isort", output_dir])
output_dirs.append(f"{dir[0]}_sync_check/" if check else dir[1])
subprocess.check_call(["black", "--target-version=py38", *output_dirs])
subprocess.check_call(["isort", *output_dirs])
for dir, output_dir in zip(source_dirs, output_dirs):
for file in glob("*.py", root_dir=dir[0]):
# remove asyncio from sync files
subprocess.check_call(
Expand Down