-
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
upgrade to flask_restx, werkzeug 3 #335
Conversation
WalkthroughThe updates primarily involve transitioning import statements from older libraries to newer ones within the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- code/api.py (2 hunks)
- code/parsers.py (1 hunks)
- code/recipes.py (1 hunks)
- requirements.txt (2 hunks)
Additional context used
Ruff
code/api.py
25-25:
pandas.json_normalize
imported but unusedRemove unused import:
pandas.json_normalize
(F401)
47-47:
flask_restx.reqparse
imported but unusedRemove unused import:
flask_restx.reqparse
(F401)
code/recipes.py
30-30:
pandas.json_normalize
imported but unusedRemove unused import:
pandas.json_normalize
(F401)
Additional comments not posted (6)
requirements.txt (3)
7-7
: Upgrade toflask_restx
.The package
flask_restplus
has been replaced withflask_restx
. Ensure that all related code changes have been made to accommodate this new package.
24-24
: Upgrade toWerkzeug==3.0.3
.The version of
Werkzeug
has been updated from0.16.1
to3.0.3
. Verify that this version is compatible with the rest of the codebase and dependencies.
25-25
: Update pinned version ofrsa
.The pinned version of
rsa
has been updated to>=4.7
to avoid a vulnerability. Ensure that this update does not introduce any compatibility issues.code/parsers.py (1)
2-2
: Update import fromflask_restplus
toflask_restx
.The import statement has been updated to use
flask_restx
instead offlask_restplus
. Ensure that all related code changes have been made to accommodate this new package.code/api.py (2)
25-25
: Update import forjson_normalize
.The import statement has been updated to use
pandas
instead ofpandas.io.json
forjson_normalize
. Ensure that this change is compatible with the rest of the code.Tools
Ruff
25-25:
pandas.json_normalize
imported but unusedRemove unused import:
pandas.json_normalize
(F401)
47-47
: Update import fromflask_restplus
toflask_restx
.The import statement has been updated to use
flask_restx
instead offlask_restplus
. Ensure that all related code changes have been made to accommodate this new package.Tools
Ruff
47-47:
flask_restx.reqparse
imported but unusedRemove unused import:
flask_restx.reqparse
(F401)
code/recipes.py
Outdated
@@ -27,7 +27,7 @@ | |||
import simplejson | |||
from collections import Iterable | |||
from collections import OrderedDict | |||
from pandas.io.json import json_normalize | |||
from pandas import json_normalize |
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.
Remove unused import.
The json_normalize
import from pandas
is not used in this file and should be removed to clean up the code.
- from pandas import json_normalize
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
from pandas import json_normalize |
Tools
Ruff
30-30:
pandas.json_normalize
imported but unusedRemove unused import:
pandas.json_normalize
(F401)
code/api.py
Outdated
@@ -22,7 +22,7 @@ | |||
import simplejson | |||
from collections.abc import Iterable | |||
from collections import OrderedDict | |||
from pandas.io.json import json_normalize | |||
from pandas import json_normalize |
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.
Remove unused imports.
Static analysis indicates that json_normalize
and reqparse
are imported but not used. Consider removing these imports to clean up the code.
- from pandas import json_normalize
- from flask_restx import reqparse
Also applies to: 47-47
Tools
Ruff
25-25:
pandas.json_normalize
imported but unusedRemove unused import:
pandas.json_normalize
(F401)
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- code/api.py (2 hunks)
- code/recipes.py (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- code/api.py
- code/recipes.py
Summary by CodeRabbit
Chores
flask_restplus
withflask_restx
.Werkzeug
to version3.0.3
.rsa
to a minimum version of4.7
.Bug Fixes
json_normalize
is imported frompandas
.