-
Notifications
You must be signed in to change notification settings - Fork 14
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
updated ruff, and updated code accordingly #218
Conversation
Reviewer's Guide by SourceryThis PR updates the Ruff linter to version 0.8.0 and makes necessary code adjustments to comply with the new version's requirements. The main changes involve updating the type annotation syntax in FastAPI route parameters using Python's Updated class diagram for FastAPI route parametersclassDiagram
class search_players {
+Annotated[str, Query]
+Annotated[str, Query] order_by = "name:asc"
+Annotated[int, Query] offset = 0
+Annotated[int, Query] limit = 20
}
class get_player_stats_summary {
+Annotated[PlayerGamemode | None, Query] gamemode = None
+Annotated[PlayerPlatform | None, Query] platform = None
}
class get_player_career {
+Annotated[PlayerGamemode | None, Query] gamemode = None
+Annotated[PlayerPlatform | None, Query] platform = None
}
class list_heroes {
+Annotated[Role | None, Query] role = None
+Annotated[Locale, Query] locale = Locale.ENGLISH_US
}
class get_hero {
+Annotated[HeroKey, Path] hero_key
+Annotated[Locale, Query] locale = Locale.ENGLISH_US
}
class list_maps {
+Annotated[MapGamemode | None, Query] gamemode = None
}
class list_roles {
+Annotated[Locale, Query] locale = Locale.ENGLISH_US
}
Updated class diagram for PlayerCareerParserclassDiagram
class PlayerCareerParser {
+valid_http_codes: ClassVar[list]
+root_path
}
note for PlayerCareerParser "Removed attribute: timeout"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @TeKrop - I've reviewed your changes - here's some feedback:
Overall Comments:
- The removal of
timeout
from PlayerCareerParser seems to be a functional change mixed in with style updates. Was this intentional? Please verify this won't impact the caching behavior.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Quality Gate passedIssues Measures |
Summary by Sourcery
Refactor FastAPI route query parameters to use 'Annotated' type for better type hinting. Update ruff to version 0.8.0 and remove sourcery from pre-commit hooks. Bump project version to 3.6.1.
Enhancements:
Build:
Chores: