Shantanu

Results 430 comments of Shantanu

@vors I think I fixed this in https://github.com/psf/black/pull/3209 . My guess is Jelle only reproduced the issue because he didn't use `--preview`, but this is now in the stable style...

See also https://github.com/psf/black/issues/1826#issuecomment-1922891622

I haven't found myself too compelled by use cases mentioned here. There seem to be plenty of acceptable workarounds (use stdin, patch, just use git review, etc).

Seems related to https://github.com/psf/black/pull/2278, cc @JEphron if you're around to take a look

Got another report of moving comments that traces back to `parenthesize_conditional_expressions` in https://github.com/psf/black/issues/4042#issuecomment-1859231535 ``` a = "".join( ( "", # comment "" if True else "", ) ) ```

Changed the title, since I think this is the same issue reported in #4199 ``` def return_true(): return ( ( True # this comment gets removed accidentally ) ) ```

The Github Action in that repo also has a workflow_dispatch trigger. So can [just make an API request](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event) in the release automation Black uses, only annoying thing would be secret...

Yes, it's inherit to `hug_parens_with_braces_and_square_brackets` (and this is one of my worries about it). Note that Black will respect magic trailing commas here and not hug, so this is a...

Yeah, I was almost thinking it could be interesting to ship a separate codemod that changes AST to fix this up. Not sure that workflow works well for Black though

Duplicate of https://github.com/psf/black/issues/2543