deepsourcestatus / test-repository

Consider using f-strings PYL-C0209
Performance
Minor
8 months ago8 months old
Formatting a regular string which could be a f-string
25            raise RuntimeError("Cannot access private data")
26
27        data = self.cursor.execute(
28            "SELECT id FROM userdata WHERE Name ={};".format(name)29        )
30        self.conn.commit()
31        return data
Formatting a regular string which could be a f-string
 6@require_http_methods(["GET", "POST"])  # Sensitive
 7def current_datetime(request):
 8    now = datetime.datetime.now()
 9    html = "<html><body>It is %s.</body></html>" % now10    return HttpResponse(html)