CodeQL documentation

Unused import

ID: py/unused-import
Kind: problem
Security severity: 
Severity: recommendation
Precision: very-high
Tags:
   - maintainability
   - useless-code
Query suites:
   - python-security-and-quality.qls

Click to see the query in the CodeQL repository

A module is imported (using the import statement) but that module is never used. This creates a dependency that does not need to exist and makes the code more difficult to read.

Recommendation

Delete the import statement.

References

  • © GitHub, Inc.
  • Terms
  • Privacy