digitaldomain / QtPyConvert

An automatic Python Qt binding transpiler to the Qt.py abstraction layer.
Other
69 stars 3 forks source link

Investigate how black is doing their AST transformations #11

Open Ahuge opened 6 years ago

Ahuge commented 6 years ago

black has a really really high quality replacement system.

Ideally we should investigate their tokenizing system and see if we can remove our redbaron dependency.

Ahuge commented 6 years ago

Demo gist

https://gist.github.com/Ahuge/f9f1c1d275889bbff82dac1760135c13

You have to modify lib2to3

Ahuge commented 6 years ago

Might have to reimplement parts of lib2to3 to add py2.7 support.

It's mostly based on pgen2