-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
⬆️ Upgrade configuration for Ruff v0.2.0 #11075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
In this PR, I'd also recommend:
|
|
Will do! v0.2.0 wasn't out yet when I put this up -- I'll update the PR to do the version bump too. |
| @app.get("/items/") | ||
| async def read_query( | ||
| query_or_default: Annotated[str, Depends(query_or_cookie_extractor)] | ||
| query_or_default: Annotated[str, Depends(query_or_cookie_extractor)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a change that was also made in latest Black: psf/black#4164.
|
📝 Docs preview for commit 312978b at: https://d38c0b0b.fastapitiangolo.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruff v0.2.2 is out.
| - id: trailing-whitespace | ||
| - repo: https://github.com/charliermarsh/ruff-pre-commit | ||
| rev: v0.1.2 | ||
| rev: v0.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v0.2.2 is out!
| rev: v0.2.0 | |
| rev: v0.2.2 |
| coverage[toml] >= 6.5.0,< 8.0 | ||
| mypy ==1.4.1 | ||
| ruff ==0.1.2 | ||
| ruff ==0.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ruff ==0.2.0 | |
| ruff ==0.2.2 |
|
Awesome, thank you @charliermarsh! 🚀 |
In Ruff v0.2.0 (upcoming), we start to warn about adding these settings under
[tool.ruff]instead of[tool.ruff.lint]. This PR just adjusts FastAPI's configuration to fix those warnings. (This works today, with the version of FastAPI uses now, and will also work with v0.2.0.)