Skip to content

Support aliased FastAPI and APIRouter imports#103

Closed
Ashif4354 wants to merge 1 commit intofastapi:mainfrom
Ashif4354:feat/aliased-imports
Closed

Support aliased FastAPI and APIRouter imports#103
Ashif4354 wants to merge 1 commit intofastapi:mainfrom
Ashif4354:feat/aliased-imports

Conversation

@Ashif4354
Copy link

The extension could not find the FastAPI app if it was imported with an alias (for example, from fastapi import FastAPI as FA). The discovery logic only looked for the exact text "FastAPI(". This caused the extension to completely miss valid applications that used different naming styles.

So updated the discovery process and the parser so the extension can now understand and detect aliased imports.

This fixes #102

@Ashif4354 Ashif4354 closed this Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aliased FastAPI/APIRouter imports is not getting detected

2 participants