2 ms·
Another issue is that yapf uses an algorithm that is quadratic, so you end up with code you actually see in practice take seconds to minutes to format. The aut
by vjeux 8y ago
Another issue is that yapf uses an algorithm that is quadratic, so you end up with code you actually see in practice take seconds to minutes to format.
The authors have been adding specific workarounds for some cases but it's a general issue with the approach:
- https://github.com/google/yapf/issues/264 https://github.com/google/yapf/issues/264
- https://github.com/google/yapf/issues/39 https://github.com/google/yapf/issues/39
Black algorithm doesn't explode in such way. It's also a lot faster overall which makes it possible and reasonable to enable a good format on save experience.