I have a simple one liner that replaces the characters at the beginning of a string with a different (shorter) string.
To achieve this I do a slice of the second string using a len call on the first string.
string2 = string1 + string2[len(string1):]
black incorrectly adds a space into the slice, like so
string2 = string1 + string2[len(string1) :]
PyCharm then highlights this as incorrect (PEP8: E203 whitespace before ':').
I'm using blackd server, version 20.8b1.
This is by design, please see https://black.readthedocs.io/en/stable/the_black_code_style.html?highlight=E203#slices
Also a duplicate of #1541, #1448, #1437, #1413, #1343, #1332, #1323, #1029, #889, #785, #565, #544, #492, #403, #354, #350, #311, #279, #264, and #227...
contemplating why I decided to become a triager for Black
Anyway, please disable flake8's E203 as it is not PEP 8 compliant.
Most helpful comment
Also a duplicate of #1541, #1448, #1437, #1413, #1343, #1332, #1323, #1029, #889, #785, #565, #544, #492, #403, #354, #350, #311, #279, #264, and #227...
contemplating why I decided to become a triager for Black
Anyway, please disable flake8's
E203as it is not PEP 8 compliant.