#8772 pylint 2.7.0-2.7.2 introduces new warnings
Closed: fixed by frenaud. Opened by slev.

With Pylint 2.7.0-2.7.2 there are new warnings:

************* Module ipatests.test_integration.test_dns_locations
ipatests/test_integration/test_dns_locations.py:46: [R1710(inconsistent-return-statements), resolve_records_from_server] Either all return statements in a function should return an expression, or none of them should.)
************* Module ipaserver.plugins.server
ipaserver/plugins/server.py:274: [R1727(condition-evals-to-constant), server_mod.post_callback] Boolean condition ''ipalocation_location' or 'ipaserviceweight' in options' will always evaluate to ''ipalocation_location'')
************* Module ipapython.install.cli
ipapython/install/cli.py:299: [R1710(inconsistent-return-statements), ConfigureTool.init_configurator] Either all return statements in a function should return an expression, or none of them should.)
************* Module ipalib.install.kinit
ipalib/install/kinit.py:25: [R1710(inconsistent-return-statements), kinit_keytab] Either all return statements in a function should return an expression, or none of them should.)
************* Module ipa-replica-manage
install/tools/ipa-replica-manage:879: [R1729(use-a-generator), ensure_last_services] Use a generator instead 'any('CA' in o for o in other_services)')
install/tools/ipa-replica-manage:884: [R1729(use-a-generator), ensure_last_services] Use a generator instead 'any('DNS' in o for o in other_services)')

Actual logical error:

ipaserver/plugins/server.py:274: [R1727(condition-evals-to-constant), server_mod.post_callback] Boolean condition ''ipalocation_location' or 'ipaserviceweight' in options' will always evaluate to ''ipalocation_location'')

This wasn't catched before in Tox task fixing for Pylint 2.7.0 because Tox environment run Pylint only over ipaclient, ipalib and ipapython. It will be addressed in PR.


Metadata Update from @slev:
- Issue assigned to slev

Fixed in https://github.com/freeipa/freeipa/pull/5660

master:

  • 3ac2cdfd431f79838ec4465bcf98f75d99f8c262 Azure: Make it possible to pass additional Pytest args
  • 85c63fbe62618fdbc5b13ce0aa47f2d478de5eac Azure: Show disk usage
  • 908e8cf33844e90e1a0b5cec3bfeac20a2b085b1 Azure: Template docs build
  • 5afe13798e41e3b21782ce8dedb13b0f41cfadc1 Azure: Run chronyd in Docker
  • 45d238103731de33bda476f7d2449bcde9463f59 Azure: Collect Host's systemd journal
  • 5daa41fc55691c9fabccdba6a91b1d899c49a624 Azure: Warn about Host's AVC and SECCOMP
  • 72adb3279abc24e6428cebf239dbfc638deae023 Azure: Disable AppArmor profile for chrony
  • 056c51161ca549eced4c0a0a1265a545a0084a0a Azure: Don't install pypi's docker
  • 91e745239393c0981205e80274407ee3e90c93fd pylint: Fix several warnings
  • 7855c77f93e0bf326e0307bce7072d5c12915659 Azure: Run Lint task as separate job

ipa-4-9:

  • 380336d6d26228c237c1ef7e7e61ed472fd66e0d Azure: Make it possible to pass additional Pytest args
  • adc4d8d7f674d159ea8f17395013859474af3290 Azure: Show disk usage
  • e80ff6f9d43731d8c1943cd154ef5f317f380414 Azure: Template docs build
  • 255be047ff5ac8e79428c70c2a3b7c8ed026c965 Azure: Run chronyd in Docker
  • 8cdc7bf070d90e0d641f32513c9ea3a709166d5d Azure: Collect Host's systemd journal
  • d47847b1a2b983a41099a63954df9b569d414959 Azure: Warn about Host's AVC and SECCOMP
  • 572f203c96baea3a086bea4e0846347b6f116bee Azure: Disable AppArmor profile for chrony
  • 6c1dc1b226254003dda882f7856c4e3b3e5b3767 Azure: Don't install pypi's docker
  • 2bec09aa038d2ef8f3819f11e67ba81d70cb5fe4 pylint: Fix several warnings
  • 188a279c5bf14b7cbd7cc0d65cc294fc6862b8d3 Azure: Run Lint task as separate job

ipa-4-8:

  • 695a42d75c8fda72416f5f57e68a29cdf8530bf4 Azure: Make it possible to pass additional Pytest args
  • ea5e38cf8a0853da63271ed6101869ad24f2d96b Azure: Show disk usage
  • 9374e996902def0f7fd4bd515522434c20f1d314 Azure: Make unique built artifacts names
  • 7f35e8e4babd17926390ee31254546aa7545bd31 Azure: Collect Host's systemd journal
  • b2e6bbf7624236eb71a6d8d8287532f9e83cbe9d Azure: Warn about Host's AVC and SECCOMP
  • e3ab472869363bd0f25f91814114903db7ed0eba Azure: Disable AppArmor profile for chrony
  • 781ca84a75d925855323d491efdd3b9550b3fdf2 Azure CI: use Ubuntu-20.04 image by default
  • 9dd4983c07a4b8adfc39efe0d3b4d9d1a98e615b Azure CI: use PPA to provide newer libseccomp version
  • 902146d81a736bd2bb7e961b18d0b64979f26596 Azure: Don't install pypi's docker
  • 030d8b3364c4af670a471af09da3998d7d412963 pylint: Fix several warnings
  • 8e97deb84cd2ac2bc73709fc9a3097d26e25977d Azure: Run Lint task as separate job

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

Metadata