#8720 New pylint failures reported for inconsistent-return-statements
Closed: fixed 3 years ago by frenaud. Opened 3 years ago 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

3 years ago

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

3 years ago

master:

  • 178dec8 pylint: fix inconsistent-return-statements

ipa-4-9:

  • 2fae28f pylint: fix inconsistent-return-statements

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

3 years ago

ipa-4-8:

  • d99af44 pylint: fix inconsistent-return-statements

Login to comment on this ticket.

Metadata