File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ allow_untyped_defs = true
93
93
94
94
[tool .ruff ]
95
95
# https://beta.ruff.rs/docs/configuration/
96
- line-length = 79
97
- select = [
96
+ line-length = 120
97
+ lint. select = [
98
98
" E" , # pycodestyle errors
99
99
" W" , # pycodestyle warnings
100
100
" F" , # pyflakes
@@ -128,7 +128,7 @@ exclude = [
128
128
" venv" ,
129
129
]
130
130
131
- ignore = [
131
+ lint. ignore = [
132
132
" E501" , # line-too-long
133
133
" W191" , # tab-indentation
134
134
]
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ def preview_view(
115
115
116
116
if to_field and not self .to_field_allowed (request , to_field ):
117
117
raise DisallowedModelAdminToField (
118
- "The field %s cannot be referenced." % to_field
118
+ f "The field { to_field } cannot be referenced."
119
119
)
120
120
121
121
model = self .model
@@ -184,12 +184,11 @@ def preview_view(
184
184
)
185
185
186
186
def get_urls (self ):
187
- info = self .model ._meta .app_label , self .model ._meta .model_name
188
187
return [
189
188
path (
190
189
"<int:snippet_id>/preview/" ,
191
190
self .admin_site .admin_view (self .preview_view ),
192
- name = "{ }_{}_preview". format ( * info ),
191
+ name = f" { self . model . _meta . app_label } _{ self . model . _meta . model_name } _preview"
193
192
),
194
193
* super ().get_urls (),
195
194
]
You can’t perform that action at this time.
0 commit comments