#8220 Pylint for python2 complains about import from ipaplatform
Closed: fixed 4 years ago by frenaud. Opened 4 years ago by sorlov.

When making a backport for ipa-4-6 (https://github.com/freeipa/freeipa/pull/4327) I faced pylint error no-name-in-module: https://travis-ci.org/freeipa/freeipa/jobs/660213287?utm_medium=notification&utm_source=github_status

************* Module ipatests.test_integration.test_sudo
ipatests/test_integration/test_sudo.py:22: [E0611(no-name-in-module), ] No name 'paths' in module 'ipatests.test_integration.ipaplatform.paths')
ipatests/test_integration/test_sudo.py:22: [W0403(relative-import), ] Relative import 'ipaplatform.paths', should be 'ipatests.test_integration.ipaplatform.paths')

The mentioned line reads:

from ipaplatform.paths import paths

The problem is presumably is caused by some recent changes to pylint config as there are numerous occurrences of exactly same same line throughout the tests code.


Adding from __future__ import absolute_import usually fixes the problem.

ipa-4-6:

  • 044748b ipatests: temporary disable pylint check no-name-in-module

@cheimes
Unfortunately I pushed the workaround before noticing your comment.
I opened https://github.com/freeipa/freeipa/pull/4332 to remove the workaround.

ipa-4-6:

  • 46b9139 ipatests: remove workaround for pylint error no-name-in-module

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

4 years ago

Login to comment on this ticket.

Metadata