Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.55 KB

README.rst

File metadata and controls

42 lines (28 loc) · 1.55 KB
Root.Redundancy.UnusedImport Parent Index
Sibling aspects Clone UnreachableCode UnusedVariable

UnusedImport

Unused imports are any kind of import/include that is not needed.

Subaspects

This aspect does not have any sub aspects.

Example

import sys
import os

print('coala is always written with lowercase c')

Importance

Redundant imports can cause a performance degrade and make code harder to understand when reading through it. Also it causes unneeded dependencies within your modules. In most programming languages, unused imports may have side effects and that may be a common false positive. However those should be avoided.

How to fix this

Usually, unused imports can simply be removed.