summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorFrançois Freitag <mail@franek.fr>2020-04-25 15:53:30 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-04-27 08:30:16 +0200
commitabea86f9e44a8eda9ad1859fe05a91509bdb8011 (patch)
tree7389b9afd85fdb5c653d38557068d44bc8caa278 /django
parent687cb38a05414f1e1fe6b255735d998bfc9741b4 (diff)
Removed unnecessary tuple wrapping of single format string argument.
Diffstat (limited to 'django')
-rw-r--r--django/apps/config.py2
-rw-r--r--django/contrib/admin/templatetags/base.py2
-rw-r--r--django/contrib/admin/utils.py2
-rw-r--r--django/core/management/commands/makemigrations.py2
-rw-r--r--django/core/management/commands/migrate.py2
-rw-r--r--django/db/models/fields/__init__.py2
-rw-r--r--django/db/models/fields/related.py2
-rw-r--r--django/urls/resolvers.py2
-rw-r--r--django/utils/datetime_safe.py2
9 files changed, 9 insertions, 9 deletions
diff --git a/django/apps/config.py b/django/apps/config.py
index f5c971fc9c..2728503d62 100644
--- a/django/apps/config.py
+++ b/django/apps/config.py
@@ -75,7 +75,7 @@ class AppConfig:
raise ImproperlyConfigured(
"The app module %r has no filesystem location, "
"you must configure this app with an AppConfig subclass "
- "with a 'path' class attribute." % (module,))
+ "with a 'path' class attribute." % module)
return paths[0]
@classmethod
diff --git a/django/contrib/admin/templatetags/base.py b/django/contrib/admin/templatetags/base.py
index ec6f10378d..e98604ac5a 100644
--- a/django/contrib/admin/templatetags/base.py
+++ b/django/contrib/admin/templatetags/base.py
@@ -28,6 +28,6 @@ class InclusionAdminNode(InclusionNode):
context.render_context[self] = context.template.engine.select_template([
'admin/%s/%s/%s' % (app_label, object_name, self.template_name),
'admin/%s/%s' % (app_label, self.template_name),
- 'admin/%s' % (self.template_name,),
+ 'admin/%s' % self.template_name,
])
return super().render(context)
diff --git a/django/contrib/admin/utils.py b/django/contrib/admin/utils.py
index 06f85d41f9..e4ddc8f017 100644
--- a/django/contrib/admin/utils.py
+++ b/django/contrib/admin/utils.py
@@ -337,7 +337,7 @@ def label_for_field(name, model, model_admin=None, return_attr=False, form=None)
else:
message = "Unable to lookup '%s' on %s" % (name, model._meta.object_name)
if model_admin:
- message += " or %s" % (model_admin.__class__.__name__,)
+ message += " or %s" % model_admin.__class__.__name__
if form:
message += " or %s" % form.__class__.__name__
raise AttributeError(message)
diff --git a/django/core/management/commands/makemigrations.py b/django/core/management/commands/makemigrations.py
index 3382887ca3..b9d43d097d 100644
--- a/django/core/management/commands/makemigrations.py
+++ b/django/core/management/commands/makemigrations.py
@@ -203,7 +203,7 @@ class Command(BaseCommand):
migration_string = writer.path
if migration_string.startswith('..'):
migration_string = writer.path
- self.stdout.write(" %s\n" % (self.style.MIGRATE_LABEL(migration_string),))
+ self.stdout.write(" %s\n" % self.style.MIGRATE_LABEL(migration_string))
for operation in migration.operations:
self.stdout.write(" - %s\n" % operation.describe())
if not self.dry_run:
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py
index 85e04b6fcc..315a734d07 100644
--- a/django/core/management/commands/migrate.py
+++ b/django/core/management/commands/migrate.py
@@ -189,7 +189,7 @@ class Command(BaseCommand):
else:
if targets[0][1] is None:
self.stdout.write(self.style.MIGRATE_LABEL(
- " Unapply all migrations: ") + "%s" % (targets[0][0],)
+ " Unapply all migrations: ") + "%s" % targets[0][0]
)
else:
self.stdout.write(self.style.MIGRATE_LABEL(
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index d00942a7b8..08c2a18d94 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -221,7 +221,7 @@ class Field(RegisterLookupMixin):
elif LOOKUP_SEP in self.name:
return [
checks.Error(
- 'Field names must not contain "%s".' % (LOOKUP_SEP,),
+ 'Field names must not contain "%s".' % LOOKUP_SEP,
obj=self,
id='fields.E002',
)
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 5ce7fac420..d517d7269b 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -133,7 +133,7 @@ class RelatedField(FieldCacheMixin, Field):
errors.append(
checks.Error(
"Reverse query name '%s' must not end with an underscore."
- % (rel_query_name,),
+ % rel_query_name,
hint=("Add or change a related_name or related_query_name "
"argument for this field."),
obj=self,
diff --git a/django/urls/resolvers.py b/django/urls/resolvers.py
index 3c95e1d686..fbe5a0fdb5 100644
--- a/django/urls/resolvers.py
+++ b/django/urls/resolvers.py
@@ -670,7 +670,7 @@ class URLResolver:
if args:
arg_msg = "arguments '%s'" % (args,)
elif kwargs:
- arg_msg = "keyword arguments '%s'" % (kwargs,)
+ arg_msg = "keyword arguments '%s'" % kwargs
else:
arg_msg = "no arguments"
msg = (
diff --git a/django/utils/datetime_safe.py b/django/utils/datetime_safe.py
index ade2dca610..7edd96f2f1 100644
--- a/django/utils/datetime_safe.py
+++ b/django/utils/datetime_safe.py
@@ -100,7 +100,7 @@ def strftime(dt, fmt):
sites.append(site)
s = s1
- syear = "%04d" % (dt.year,)
+ syear = "%04d" % dt.year
for site in sites:
s = s[:site] + syear + s[site + 4:]
return s