Fix code in test

This commit is contained in:
Jonas Vacek 2025-10-06 21:21:33 +02:00
parent 4bf48e04fc
commit 8412263001
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View File

@ -50,5 +50,5 @@ urlpatterns_quotes = [
# Error - leading trail slash and argument should stay in message
urlpatterns_params_bad = [
path("/bad/<slug:slug>/", views.bad_view), # DJ015
path("/<slug:slug>", views.bad_view), # DJ014
path("/<slug:slug>", views.bad_view), # DJ015
]

View File

@ -225,7 +225,7 @@ DJ015 [*] URL route `/bad/<slug:slug>/` has an unnecessary leading slash
51 | urlpatterns_params_bad = [
52 | path("/bad/<slug:slug>/", views.bad_view), # DJ015
| ^^^^^^^^^^^^^^^^^^^
53 | path("/<slug:slug>", views.bad_view), # DJ014
53 | path("/<slug:slug>", views.bad_view), # DJ015
54 | ]
|
help: Remove leading slash
@ -234,7 +234,7 @@ help: Remove leading slash
51 | urlpatterns_params_bad = [
- path("/bad/<slug:slug>/", views.bad_view), # DJ015
52 + path("bad/<slug:slug>/", views.bad_view), # DJ015
53 | path("/<slug:slug>", views.bad_view), # DJ014
53 | path("/<slug:slug>", views.bad_view), # DJ015
54 | ]
DJ015 [*] URL route `/<slug:slug>` has an unnecessary leading slash
@ -242,7 +242,7 @@ DJ015 [*] URL route `/<slug:slug>` has an unnecessary leading slash
|
51 | urlpatterns_params_bad = [
52 | path("/bad/<slug:slug>/", views.bad_view), # DJ015
53 | path("/<slug:slug>", views.bad_view), # DJ014
53 | path("/<slug:slug>", views.bad_view), # DJ015
| ^^^^^^^^^^^^^^
54 | ]
|
@ -250,6 +250,6 @@ help: Remove leading slash
50 | # Error - leading trail slash and argument should stay in message
51 | urlpatterns_params_bad = [
52 | path("/bad/<slug:slug>/", views.bad_view), # DJ015
- path("/<slug:slug>", views.bad_view), # DJ014
53 + path("<slug:slug>", views.bad_view), # DJ014
- path("/<slug:slug>", views.bad_view), # DJ015
53 + path("<slug:slug>", views.bad_view), # DJ015
54 | ]