Skip to content

False positive unused-import and unused-wildcard-import #10827

@fgallaire

Description

@fgallaire

Bug description

This commit creates 2 errors:
https://forge.apps.education.fr/cpiquet/execubot/-/commit/90ed5c5745687ae17af32d7d7e948937daf4a28e

__all__ = ["solve", "extractor", "stdgrid", "dictlang", "generate", "tags", "difficulty"]

is imported via wildcard and all fonctions are used in the modules execubot_py.cli and tests.test_execubot, and I don't see why the files function seems to trouble pylint.

Configuration

[tool.pylint.imports]
allow-wildcard-with-all = true

Command used

pylint src tests

Pylint output

************* Module execubot_py.cli
src/execubot_py/cli.py:22:0: W0611: Unused import * (unused-import)
************* Module tests.test_execubot
tests/test_execubot.py:8:0: W0614: Unused import(s) files from wildcard import of execubot_py (unused-wildcard-import)

-------------------------------------------------------------------
Your code has been rated at 9.95/10 (previous run: 10.00/10, -0.05)

Expected behavior

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

Pylint version

pylint 3.3.7
astroid 3.3.10
Python 3.12.3 (main, Jan  8 2026, 11:30:50) [GCC 13.3.0]

pylint 3.3.8
astroid 3.3.11
Python 3.10.18 (main, Aug 18 2025, 19:18:25) [Clang 20.1.4 ]

OS / Environment

Ubuntu

Additional dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs triage 📥Just created, needs acknowledgment, triage, and proper labelling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions