mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Add more Ruff rules (#891)
* ruff: apply rule F * ruff: apply rule E * ruff: apply rule SIM * ruff: apply rule TCH * ruff: apply rule ERA * ruff: apply rule PLW * ruff: apply rule FLY * ruff: apply rule PERF * ruff: apply rules FURB & RUF
This commit is contained in:
10
sith/urls.py
10
sith/urls.py
@ -71,20 +71,20 @@ if settings.DEBUG:
|
||||
|
||||
urlpatterns += [path("__debug__/", include(debug_toolbar.urls))]
|
||||
|
||||
if settings.SENTRY_ENV == "development":
|
||||
if settings.SENTRY_ENV == "development" and settings.SENTRY_DSN:
|
||||
"""Sentry debug endpoint
|
||||
|
||||
|
||||
This function always crash and allows us to test
|
||||
the sentry configuration and the modal popup
|
||||
displayed to users on production
|
||||
|
||||
|
||||
The error will be displayed on Sentry
|
||||
inside the "development" environment
|
||||
|
||||
|
||||
NOTE : you need to specify the SENTRY_DSN setting in settings_custom.py
|
||||
"""
|
||||
|
||||
def raise_exception(request):
|
||||
division_by_zero = 1 / 0
|
||||
_division_by_zero = 1 / 0
|
||||
|
||||
urlpatterns += [path("sentry-debug/", raise_exception)]
|
||||
|
Reference in New Issue
Block a user