yapf dropped support for the "verify" keyword - what kind of PR would you suggest?
Opened this issue · 2 comments
tldr: Should I make a PR to remove use of yapf
's verify
or to pin installing a specific version of yapf
that supports it, like 0.40.1
?
Howdy howdy! Thanks for semi-maintaining elpy (I know you don't really have the time now-a-days). yapf
removed support for the verify
keyword which is currently used by yapfutil.py:fix_code()
. I see two ways going forward on how to fix the resulting unexpected keyword argument error. Either pin the installed yapf
to a version that supports the verify
keyword or remove the usage of the verify
keyword.
I'm partial to removing support for the verify
keyword but I don't have the context you do.
Hey!
The way to go about it is to check the version of yapf
and if its a version that supports it (eg version < 0.40.1
) then passing the verify keyword is fine, otherwise omit it from being passed.
That way we minimize breaking projects that have an older version of yapf
pinned.
Thank you!
Makes sense to me and is better than just pinning it. I'll follow-up with a PR shortly.