#8720 New pylint failures reported for inconsistent-return-statements
Closed: fixed by frenaud. Opened by frenaud.

pylint 2.7.0 now emits new errors for inconsistent-return-statements if one of try/except statement is not returning explicitly while the other do (see whatsnew).

Because of this new check, our tox pipeline is failing with:

************* Module ipaclient.plugins.vault
lib/python3.8/site-packages/ipaclient/plugins/vault.py:559: [R1710(inconsistent-return-statements), _TransportCertCache.load_cert] Either all return statements in a function should return an expression, or none of them should.)
lib/python3.8/site-packages/ipaclient/plugins/vault.py:659: [R1710(inconsistent-return-statements), ModVaultData._do_internal] Either all return statements in a function should return an expression, or none of them should.)
************* Module ipalib.rpc
lib/python3.8/site-packages/ipalib/rpc.py:687: [R1710(inconsistent-return-statements), KerbTransport.single_request] Either all return statements in a function should return an expression, or none of them should.)

(see for instance PR #5579). This is blocking gating and needs to be fixed asap.


Metadata Update from @frenaud:
- Issue assigned to frenaud

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/5582

master:

  • 178dec8fc350597b33b5d30728f195cbf20dd24e pylint: fix inconsistent-return-statements

ipa-4-9:

  • 2fae28f974ccdbcf021cb506b31761cf04547c64 pylint: fix inconsistent-return-statements

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

ipa-4-8:

  • d99af44b910fa1eaa138e698e60dfc2b7c0fe2a8 pylint: fix inconsistent-return-statements
Metadata