Skip to content

fix: filter hardcoded FastAPI params from **extra to prevent TypeError#1134

Open
hieusats wants to merge 1 commit intofeldroy:mainfrom
hieusats:fix/fastapi-hardcoded-params
Open

fix: filter hardcoded FastAPI params from **extra to prevent TypeError#1134
hieusats wants to merge 1 commit intofeldroy:mainfrom
hieusats:fix/fastapi-hardcoded-params

Conversation

@hieusats
Copy link
Copy Markdown

Problem

Passing , , , , , , or through raises a confusing TypeError: FastAPI.__init__() got multiple values for keyword argument.

These params were user-settable when Air inherited from FastAPI. The composition refactor hardcoded them to None but still forwards **extra to FastAPI(), causing the conflict.

import air
app = air.Air(docs_url="/docs")  # TypeError!

Fix

Filter the 7 reserved params from **extra before forwarding to FastAPI(). This prevents the conflict while keeping the hardcoded None values intact (Air manages these internally).

Closes #1073

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.

BUG: Hardcoded FastAPI params cause TypeError when passed through Air()

1 participant