Skip to content
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

Ugly code formatting for multiple contexts #592

Closed
louisabraham opened this issue Nov 3, 2018 · 3 comments
Closed

Ugly code formatting for multiple contexts #592

louisabraham opened this issue Nov 3, 2018 · 3 comments

Comments

@louisabraham
Copy link

    with ThreadPoolExecutor(max_workers=n_locations) as executor, tqdm(
        total=n_locations
    ) as pbar:

This is how black formats my code. It makes it quite unreadable.

@bcb
Copy link

bcb commented Nov 7, 2018

This is more of a Python issue.

It would be better if with took a parenthesized tuple of contexts.

with (
    ThreadPoolExecutor(max_workers=n_locations) as executor,
    tqdm(total=n_locations) as pbar,
):

@bcb
Copy link

bcb commented Nov 7, 2018

Also duplicate of #557

@JelleZijlstra
Copy link
Collaborator

Closing as a dupe of #557.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants