Turns out docformatter-v1.7.8 mangles r-strings in a way that alters the semantics of the program. I had to revert back to v1.7.7 as it doesn't change these r-strings.
def foo(self) -> str:
"""Returns bash that locates a usable SSH identity and defines `good_ssh`."""
return r"""
identity_file=""
for candidate in "$HOME"/.ssh/id_ed25519 "$HOME"/.ssh/id_rsa "$HOME"/.ssh/id_ecdsa "$HOME"/.ssh/id_dsa; do
...
"""
Turns out docformatter-v1.7.8 mangles r-strings in a way that alters the semantics of the program. I had to revert back to v1.7.7 as it doesn't change these r-strings.
Example:
In case it's of any help, complete example is here: https://github.com/whoschek/bzfs/blob/0ce658cc65bac47cb9384ad83f5f54dd9aa6bf0e/bzfs_tests/itest/test_lima_vm_sh.py#L431-L464