Skip to content

Files

Latest commit

 

History

History
24 lines (14 loc) · 359 Bytes

shadowed-import.md

File metadata and controls

24 lines (14 loc) · 359 Bytes

Pattern: Use of shadowed import

Issue: -

Description

Used when a module is aliased with a name that shadows another import.

Example of incorrect code:

from pathlib import Path

import FastAPI.Path as Path  # [shadowed-import]

Example of correct code:

from pathlib import Path

import FastAPI.Path as FastApiPath