Skip to content

Cannot disable 'cyclic-import' warning #9490

Open
@rpullm168

Description

@rpullm168

Bug description

Neither:
`# pylint: disable=cyclic-import`
nor:
`# pylint: disable=R0401`

squelches the "Cyclic import" warning.  Tried at all scopes, all the way up to global module scope, to no avail: warning is still emitted.

(The apparent cyclic import is a false positive that does not actually occur in runtime, which is not the bug I'm reporting.)

The warning can be successfully disabled by adding a `disable=cyclic-import` clause in the `.pylintrc` file, but that suppresses this check for all modules in the package directory, not desirable.

Configuration

No response

Command used

pylint setup.py

Pylint output

************* Module setup
setup.py:1:0: R0401: Cyclic import (ea_vault.vault_api -> ea_vault.vault_cache) (cyclic-import)

Expected behavior

(no warning)

Pylint version

pylint 3.1.0
astroid 3.1.0
Python 3.12.2 (c3.12.2:6abddd9f6a, Feb 6, 2024, 17:02:06) [Clang 13.0.0 (clang-1200.0.29.30)]

OS / Environment

macOS Darwin Kernel Version 21.3.0

Additional dependencies

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🪲Needs specification 🔐Accepted as a potential improvement, and needs to specify edge cases, message names, etc.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions