Skip to content
Snippets Groups Projects
Commit a69e18f1 authored by Yoann Schneider's avatar Yoann Schneider :tennis: Committed by Erwan Rouchet
Browse files

Introduce UP031

parent 2b9aed5f
No related branches found
No related tags found
1 merge request!2307Introduce pyupgrade
This commit is part of merge request !2307. Comments created here will be created in the context of that merge request.
......@@ -120,7 +120,7 @@ class LastItemTransform(Transform):
def as_sql(self, compiler, connection):
lhs, params = compiler.compile(self.lhs)
return "%s[array_length(%s, 1)]" % (lhs, lhs), params
return f"{lhs}[array_length({lhs}, 1)]", params
@property
def output_field(self):
......
......@@ -39,6 +39,10 @@ select = [
"UP027",
# format-literals
"UP030",
# printf-string-formatting
"UP031",
# f-string
"UP032",
]
ignore = ["E501", "RET502", "RET503"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment