Jelle Zijlstra

Results 643 comments of Jelle Zijlstra

We have a special case to not add spaces in `#'`: https://github.com/psf/black/blob/8ed3e3d07ea3e6d62e3e533e69f96a0ff148cd5d/src/black/comments.py#L26. I don't remember why; maybe such comments are special to some IDE.

Thanks for finding that! It would be useful to add links to the code to explain why we have all these exceptions. We could also verify whether pweave still needs...

Actually pweave seems dead: https://github.com/mpastell/Pweave/issues/161. So maybe we don't need to keep support for it around?

This seems risky. Comments are often commented out code or other structured data. I think we should not merge short comments, but splitting long ones is probably OK.

@yaelbh are you saying that Black is causing the lines to become too long? As I understand it, this issue is about comments that are too long by themselves, not...

For comment lines specifically, there is a good chance we'll never split them. There are other issues in https://github.com/psf/black/labels/F%3A%20linetoolong that we should fix though.

In the original example the line does actually become shorter, although it's a marginal improvement. In @TomFryers's example it's true that we make the lines longer, but those examples seem...

#2839 should do this. Unfortunately I haven't had the chance to fix the linking issues in that PR.

Similarly, we can infer that the following always return a bool: - UnaryOp with `not` - BinOp with `in`, `not in`, `is`, `is not`. (But not `==` which can return...

You can just write ``` def is_list_type(tp) -> bool: return typing_inspect.get_origin(tp) is list ```