Skip to content

Conversation

@finswimmer
Copy link
Contributor

This PR fixes an issue where multiline string parameters in function were formatted by docformatter.

If the input looked like this:

foo = textwrap.dedent("""\
   bar
   baz
""")

The wrong output looked like this:

foo = textwrap.dedent(\
"""\
   bar
   baz
"""\
)

My expectation is that docformatter do nothing in this case.

I was able to narrow down the underlying issue by myself. The actual fix was than created with the help of AI, as my knowledge about the token stuff is quite limited 🙈

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

Successfully merging this pull request may close these issues.

1 participant