Skip to content

[FEATURE] Remove unused explicit imports from modules that (may) have side-effects #183

@Avasam

Description

@Avasam

Describe the solution you'd like A clear and concise description of what you want to
happen.

If side-effects cannot be analysed (or are analyzed as "maybe"), could pycln still remove unused explicit imports?
ie:

from c_module import used, unused
# to
from c_module import used


from c_module import unused
# to
import c_module

Describe alternatives you've considered A clear and concise description of any
alternative solutions or features you've considered.

For now I # nopycln: import those lines (and/or add the c-modules to the exclude list).

Additional context Add any other context or screenshots about the feature request
here.

Came from the following comments: #182 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions