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

Don't bind specific versions of black, monkey patch methods on ast level #88

Open
KOLANICH opened this issue Nov 3, 2022 · 0 comments

Comments

@KOLANICH
Copy link

KOLANICH commented Nov 3, 2022

Currently blue binds exact version of black. It is not cool, we miss the possibility to update black.

If I understand right, it does it because a lot of things are hardcoded into black to make it look more uncompromising and deter runtime modification, so you just replace the methods with own ines, and to make sure they are consistent with the rest of black you bind the exact version.

So the proposal:

  1. ast.parse the needed files of black
  2. Modify the AST heuristically with the custom code. It can do things like replacing hardcoded literals.
  3. exec
  4. PROFIT

It should allow us to use the latest version of black.

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

1 participant