Skip to content
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

Ruff: Fix for bump to 0.9.6 #11759 #11768

Merged
merged 7 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dojo/api_v2/exception_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def custom_exception_handler(exc, context):
# There is no standard error response, so we assume an unexpected
# exception. It is logged but no details are given to the user,
# to avoid leaking internal technical information.
logger.exception(exc)
logger.error(exc)
response = Response()
response.status_code = HTTP_500_INTERNAL_SERVER_ERROR
response.data = {}
Expand All @@ -65,6 +65,6 @@ def custom_exception_handler(exc, context):
else:
# HTTP status code 500 or higher are technical errors.
# They get logged and we don't change the response.
logger.exception(exc)
logger.error(exc)

return response
4 changes: 2 additions & 2 deletions dojo/jira_link/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ def prepare_jira_issue_fields(
def add_jira_issue(obj, *args, **kwargs):
def failure_to_add_message(message: str, exception: Exception, _: Any) -> bool:
if exception:
logger.exception(exception)
logger.error(exception)
logger.error(message)
log_jira_alert(message, obj)
return False
Expand Down Expand Up @@ -928,7 +928,7 @@ def update_jira_issue_for_finding_group(finding_group, *args, **kwargs):
def update_jira_issue(obj, *args, **kwargs):
def failure_to_update_message(message: str, exception: Exception, obj: Any) -> bool:
if exception:
logger.exception(exception)
logger.error(exception)
logger.error(message)
log_jira_alert(message, obj)
return False
Expand Down
2 changes: 1 addition & 1 deletion dojo/product/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ def delete_api_scan_configuration(request, pid, pascid):

@user_is_authorized(Product_Group, Permissions.Product_Group_Edit, "groupid")
def edit_product_group(request, groupid):
logger.exception(groupid)
logger.error(groupid)
group = get_object_or_404(Product_Group, pk=groupid)
groupform = Edit_Product_Group_Form(instance=group)

Expand Down
2 changes: 1 addition & 1 deletion requirements-lint.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruff==0.9.4
ruff==0.9.5
Loading