mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +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:
1 parent
d114b01bcc
commit
d16a207a83
82 files changed
+836
-748
No files matched your search
+5
-5
@@ -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