Skip to content

Add fix to re-export unused first-party imports in __init__.py files #10391

@zanieb

Description

@zanieb

See #10365 (comment) and #10390

We currently do not offer any fixes for unused imports in __init__.py files.

This issue is to fix first-party imports by

  1. Adding them to __all__ if __all__ is present
  2. Otherwise, converting them to a redundant alias e.g. import foo as foo.

We can probably label this fix as safe.

Metadata

Metadata

Assignees

Labels

fixesRelated to suggested fixes for violations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions