-
Notifications
You must be signed in to change notification settings - Fork 1
Feat rspy197/update to stac fastapi 3.0.0 #484
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
Feat rspy197/update to stac fastapi 3.0.0 #484
Conversation
| @@ -1,4 +1,15 @@ | |||
| # This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. | |||
Check warning
Code scanning / Trivy
urllib3: proxy-authorization request header is not stripped during cross-origin redirects
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
SonarQube Quality Gate Result
updated: 9/18/2024, 14:36:01 (UTC+0) |
|
|
||
| # Don't forward responses that fail | ||
| if response.status_code != 200: | ||
| if response.status_code not in [200, 201]: |
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.
Could you use if not response.is_success instead ? @Padeanu what do you think ?
@property
def is_success(self) -> bool:
"""
A property which is `True` for 2xx status codes, `False` otherwise.
"""
return codes.is_success(self.status_code)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.
Yes, i would be nice
|
|
||
| if path == "/collections": | ||
| return CATALOG_COLLECTION | ||
| new_path = CATALOG_COLLECTION |
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.
Why do you use a new_path variable, why can't you just return as before ?
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.
It's for the code readability + easier to manipulate in case of debugging.
…e_to_stac-fastapi_3.0.0
…api_3.0.0' into feat-rspy346/oauth2+feat-rspy197/fastapi_3.0.0
…197/fastapi_3.0.0
…e_to_stac-fastapi_3.0.0
…api_3.0.0' into feat-rspy346/oauth2+feat-rspy197/fastapi_3.0.0
…2+feat-rspy197/fastapi_3.0.0
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
Check warning
Code scanning / Trivy
urllib3: proxy-authorization request header is not stripped during cross-origin redirects
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
Check warning
Code scanning / Trivy
urllib3: proxy-authorization request header is not stripped during cross-origin redirects
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
Check warning
Code scanning / Trivy
urllib3: proxy-authorization request header is not stripped during cross-origin redirects
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
Check warning
Code scanning / Trivy
urllib3: proxy-authorization request header is not stripped during cross-origin redirects
…e_to_stac-fastapi_3.0.0
Description:
The goal of this PR is to update to the latest version of stac-fastapi 3.0.0.