From a375e911efcc78054d09ef31422e081507e56623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Srinivas=20=20Thatiparthy=20=28=E0=B0=B6=E0=B1=8D=E0=B0=B0?= =?UTF-8?q?=E0=B1=80=E0=B0=A8=E0=B0=BF=E0=B0=B5=E0=B0=BE=E0=B0=B8=E0=B1=8D?= =?UTF-8?q?=20=20=E0=B0=A4=E0=B0=BE=E0=B0=9F=E0=B0=BF=E0=B0=AA=E0=B0=B0?= =?UTF-8?q?=E0=B1=8D=E0=B0=A4=E0=B0=BF=29?= Date: Sat, 10 Nov 2018 02:14:12 +0530 Subject: [PATCH] Removed unused variables. --- django/contrib/admindocs/utils.py | 4 ---- django/contrib/contenttypes/models.py | 1 - .../contrib/staticfiles/management/commands/collectstatic.py | 1 - 3 files changed, 6 deletions(-) diff --git a/django/contrib/admindocs/utils.py b/django/contrib/admindocs/utils.py index 7347a42180..bc0a3bca54 100644 --- a/django/contrib/admindocs/utils.py +++ b/django/contrib/admindocs/utils.py @@ -110,8 +110,6 @@ def create_reference_role(rolename, urlbase): def _role(name, rawtext, text, lineno, inliner, options=None, content=None): if options is None: options = {} - if content is None: - content = [] node = docutils.nodes.reference( rawtext, text, @@ -128,8 +126,6 @@ def create_reference_role(rolename, urlbase): def default_reference_role(name, rawtext, text, lineno, inliner, options=None, content=None): if options is None: options = {} - if content is None: - content = [] context = inliner.document.settings.default_reference_context node = docutils.nodes.reference( rawtext, diff --git a/django/contrib/contenttypes/models.py b/django/contrib/contenttypes/models.py index ad2e0bc904..0ff0933faf 100644 --- a/django/contrib/contenttypes/models.py +++ b/django/contrib/contenttypes/models.py @@ -86,7 +86,6 @@ class ContentTypeManager(models.Manager): model__in=needed_models ) for ct in cts: - model = ct.model_class() opts_models = needed_opts.pop(ct.model_class()._meta, []) for model in opts_models: results[model] = ct diff --git a/django/contrib/staticfiles/management/commands/collectstatic.py b/django/contrib/staticfiles/management/commands/collectstatic.py index 6e11b984a7..7f5bbbf39b 100644 --- a/django/contrib/staticfiles/management/commands/collectstatic.py +++ b/django/contrib/staticfiles/management/commands/collectstatic.py @@ -271,7 +271,6 @@ class Command(BaseCommand): # unmodified files. can_skip_unmodified_files = not (self.symlink ^ os.path.islink(full_path)) else: - full_path = None # In remote storages, skipping is only based on the # modified times since symlinks aren't relevant. can_skip_unmodified_files = True