Skip to content
#

formatter

Here are 964 public repositories matching this topic...

black
ftnext
ftnext commented Dec 25, 2020

Describe the bug I found docstring of format_str() is confusing

As is

    `mode` determines formatting options, such as how many characters per line are
    allowed.  Example:

    >>> import black
    >>> print(black.format_str("def f(arg:str='')->None:...", mode=Mode()))
    def f(arg: str = "") -> None:
        ...

Issue the above code causes NameError

calebcartwright
calebcartwright commented Oct 20, 2020

#4478 included some initial support for the new ConstBlock expression kind variant, but there's opportunities to enhance and improve the formatting.

The relevant section of the codebase can be found in formatting/expr.rs
https://github.com/rust-lang/rustfmt/blob/cbe01e47024c852e2ed852671e76f7929c4bab91/src/formatting/expr.rs#L127-L129

There are 3 core activities to completing this issue:

Improve this page

Add a description, image, and links to the formatter topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the formatter topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.