Re: Naming in PyQt programs and PEP8 naming convention
Florian Bruhin <[email protected]> Wed, 1 Apr 2020 15:50:47 +0200
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <[email protected]> |
Hey, On Wed, Mar 04, 2020 at 08:34:31AM +0100, Gottfried Müller wrote: > I am using the predefined pylint config file. There is the snake_case > option activated. It looks strange combining the Qt names in camelCase > with the snake_case option. Does anybody change the pylint config file > and how? Sorry for the late answer, this was lying around in my mailbox for a while and I forgot about it. You'll likely need to adjust the setting anyways, because you'll need to use the camelCase convention when overriding virtual C++ methods from Qt (or even just when calling methods of course). The remaining question is whether to use snake_case for the Python part of your codebase, or switch to camelCase (against PEP8) for everything. I went for the former for my project, some projects like pytest-qt just expose both (e.g. qtbot.add_widget() and qtbot.addWidget()) and let the user decide. Here's my .pylintrc, though it's pretty permissive in general: https://github.com/qutebrowser/qutebrowser/blob/v1.10.1/.pylintrc#L50 Florian -- [email protected] (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/ _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE4E5WAAJAG47w528KkW6wyP1VoHIFAl6EnDUACgkQkW6wyP1V oHJUYQ/9HLBaUVzpfFZpzPPC2J2Dm9EYWvf8WmerejKdRnmwxeegre79b+8GPInP 2P2YCNeSUojTMzm2ItSEulKYygXmDajOMFxHYVY6m4GzLxREjuZTU8mXlzprtyOF vV1PcS3gt6Pdo9GYziteS45GDLcA94CkcDINNV7cr45Ig9UowOrhRnjr5CoTzJB9 xCKzLZ7gHDIYUmuQQSK8iDIkQ1/+ors+4uTTNrMpe1TEoBJO7UjeeJF6Rnb2zEK1 EOAfVT2IsbAVgnheKMbbrgMFrvX+eurafsCcwbISATBM2mPNplIAyKdfgaN/AQ4b M+B5gCW0Ox2B2WTFcZfkoihSUKxwoBBCIqOc+w+zTjMON5Tguveb18K+CKRlQe2V LL9kx2al0pMoOdWPScN8/fdkJeQs4RE945iFdo8FQ/f+ElMvkBesSDLSGr/SvMw1 00jYi6q4pbBrOrcI0foQ/HRaLoj4VDipcFEkh/kcvAJc4RkP3H17KYkIn2Ii/mxS Gpv2m9fmJSFCKq25HoST1X2Dg+Oz5+8Gg15oTrwg9m1Zo8bVK2GvbhkM3sMhDe00 urgDZT8Jp8V906swmi5+Dc1otVsbETD21XKXsMOSE7HGbWkJZAB+549CmfK5rOfJ 5Ha10vUBrNAVoTI89DxN3yAnNFWlvQOWoYYDNwrjPY4VVvCqppo= =O3ZY -----END PGP SIGNATURE-----