Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yapf dropped support for the "verify" keyword - what kind of PR would you suggest? #2044

Open
aaronemassey opened this issue May 4, 2024 · 2 comments

Comments

@aaronemassey
Copy link

aaronemassey commented May 4, 2024

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.

@gopar
Copy link
Collaborator

gopar commented May 4, 2024

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!

@aaronemassey
Copy link
Author

Makes sense to me and is better than just pinning it. I'll follow-up with a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants