Text of codeql.github.com › codeql-query-help › python › py-unused-import as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Unused import — CodeQL query help documentation

CodeQL query help documentation » CodeQL query help for Python » Unused import ¶ ID: py/unused-import Kind: problem Security severity: Severity: recommendation Precision: very-high Tags: - quality - maintainability - useless-code Query suites: - python-code-quality.qls - 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 ¶ Python: import statement . © GitHub, Inc. Terms Privacy