#8297 Fix new pylint 2.5.0 warnings and errors
Closed: fixed 2 months ago by cheimes. Opened 3 months ago by cheimes.

pylint 2.5.0 has introduced several new warnings and errors.

  • f-string-without-interpolation are f-strings that don't contain any formatting. It's not a bug but a useful feature.
  • exception-escape when the e from try / except Exception as e. FreeIPA has a couple of bugs related to nested exceptions.

It also finds additional issues:
too-many-function-args in several files. These should be addressed eventually. However we have to silence it for now to not break internal APIs.
signature-differs in DsInstance

************* Module ipaclient.install.client
ipaclient/install/client.py:1909: [W1661(exception-escape), get_ca_certs] Using an exception object that was bound by an except handler)
^G************* Module ipaserver.install.dsinstance
ipaserver/install/dsinstance.py:655: [W0222(signature-differs), DsInstance.start] Signature differs from overridden 'start' method)
ipaserver/install/dsinstance.py:659: [W0222(signature-differs), DsInstance.stop] Signature differs from overridden 'stop' method)
************* Module ipaserver.install.server.upgrade
ipaserver/install/server/upgrade.py:358: [W1661(exception-escape), upgrade_adtrust_config] Using an exception object that was bound by an except handler)
************* Module ipaserver.plugins.migration
ipaserver/plugins/migration.py:865: [W1661(exception-escape), migrate_ds.migrate] Using an exception object that was bound by an except handler)
************* Module ipatests.azure.scripts.setup_containers
ipatests/azure/scripts/setup_containers.py:5: [E0401(import-error), ] Unable to import 'docker')

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

3 months ago

master:

  • 9941c9e Address issues found by new pylint 2.5.0

ipa-4-6:

  • 8401076 Address issues found by new pylint 2.5.0

ipa-4-8:

  • ef2a745 Address issues found by new pylint 2.5.0

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

2 months ago

Login to comment on this ticket.

Metadata