Automated replacement for unscoped -> scoped enums

Florian Bruhin me at the-compiler.org
Tue Dec 1 20:22:34 GMT 2020


Hey,

I took a quick look at how to automate the replacement of unscoped to
scoped enums:
https://www.riverbankcomputing.com/static/Docs/PyQt5/gotchas.html#enums

I ended up parsing the .pyi files (making some assumptions about how
they're generated) and then writing a script which replaces all enum
accesses based on that.

If anyone else needs it, you can find it here:
https://github.com/qutebrowser/qutebrowser/issues/5904#issuecomment-736792450

Florian

-- 
me at the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org 
       https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
       GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
             I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20201201/54a82419/attachment-0001.sig>


More information about the PyQt mailing list