You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug black does not respect the --line-length default of 88 on a with statement
To Reproduce Steps to reproduce the behavior:
Take the following piece of code defined in the following branch
asyncdefsend_batch_mail_async(params: List[Dict[str, Union[str, int, dict]]]) ->None:
""" Helper method to send batch mails asynchronously. This opens a new thread as sending a mail is an I/O bound process """withcurrent_app._get_current_object().app_context(), mail.get_connection() asconnection:
messages= [
EmailMessage(
param["subject"],
render_template(
f"email/{param['template_id']}.txt", **param["template_params"]
),
param["sender"],
[param["receiver"]],
connection=connection,
)
forparaminparams
]
connection.send_messages(messages)
Run black with the following arguments black --config config/pyproject.toml .
Describe the bug
black
does not respect the--line-length
default of 88 on awith
statementTo Reproduce Steps to reproduce the behavior:
black --config config/pyproject.toml .
Expected behavior
Expectation from
black
is to be able to format thewith
statement in constraint to the--line-length
config parameter.Environment (please complete the following information):
black
version: 21.5b1Does this bug also happen on main?
Yes the same issue persists using the main branch as well.
Link
Screenshot
Additional context
Issue is reported in the following GitHub action run https://github.com/unofficialopensource-knit/email_service/pull/40/checks?check_run_id=2599706530
The text was updated successfully, but these errors were encountered: