0

I'm using YAPF with the PEP8 style, and I'm trying to ignore whenever there's whitespace around the equals '=' operator, for example:

environment: Optional[Dict[str, str]] = None

Is formatted to:

environment: Optional[Dict[str, str]]=None

There isn't a YAPF knob (https://github.com/google/yapf#knobs) which allows me to change this configuration.

Is there a way to make YAPF use some custom PEP8 configuration, or change this setting?

solarflare
  • 880
  • 2
  • 8
  • 23

1 Answers1

0

add the following lines to .pyproject.toml

[yapf]
style = pep8
spaces_around_eq = no
  • This errors for me and says 'Unknown style option "SPACES_AROUND_EQ" Do you have a documentation link showing its usage? – solarflare Jun 16 '23 at 09:29