From ad7aa02c1d927e59f9c3f10b8f67eac016553bae Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 14 Jan 2019 18:04:00 -0800 Subject: [PATCH] Removed unnecessary string formatting of strings. --- django/db/models/expressions.py | 2 +- django/db/models/fields/related.py | 2 +- django/test/runner.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index 1ab9ae11e0..d433d6b8a0 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -807,7 +807,7 @@ class Ref(Expression): return self def as_sql(self, compiler, connection): - return "%s" % connection.ops.quote_name(self.refs), [] + return connection.ops.quote_name(self.refs), [] def get_group_by_cols(self): return [self] diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index 339e4ec767..eda09c2ebe 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -1410,7 +1410,7 @@ class ManyToManyField(RelatedField): opts = model._meta.auto_created._meta clashing_obj = '%s.%s' % (opts.label, _get_field_name(model)) else: - clashing_obj = '%s' % model._meta.label + clashing_obj = model._meta.label return [ checks.Error( "The field's intermediary table '%s' clashes with the " diff --git a/django/test/runner.py b/django/test/runner.py index 180b6911fb..eeae295704 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -66,9 +66,9 @@ class DebugSQLTextTestResult(unittest.TextTestResult): self.stream.writeln(self.separator1) self.stream.writeln("%s: %s" % (flavour, self.getDescription(test))) self.stream.writeln(self.separator2) - self.stream.writeln("%s" % err) + self.stream.writeln(err) self.stream.writeln(self.separator2) - self.stream.writeln("%s" % sql_debug) + self.stream.writeln(sql_debug) class RemoteTestResult: