summaryrefslogtreecommitdiff
path: root/django/template
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2019-12-09 17:33:51 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-12-10 08:29:30 +0100
commit23af08666563d6ffd2b260de131ffa1d07c414ce (patch)
tree50c87661d39a3cd273b302267b4ab8c09199a2d1 /django/template
parentd6505273cd889886caca57884fa79941b18c2ea6 (diff)
Used full module import for inspect in template/base.py.
Diffstat (limited to 'django/template')
-rw-r--r--django/template/base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/template/base.py b/django/template/base.py
index cba047e4de..ce33051312 100644
--- a/django/template/base.py
+++ b/django/template/base.py
@@ -50,10 +50,10 @@ times with multiple contexts)
'<html></html>'
"""
+import inspect
import logging
import re
from enum import Enum
-from inspect import getcallargs, getfullargspec, unwrap
from django.template.context import BaseContext
from django.utils.formats import localize
@@ -707,9 +707,9 @@ class FilterExpression:
# First argument, filter input, is implied.
plen = len(provided) + 1
# Check to see if a decorator is providing the real function.
- func = unwrap(func)
+ func = inspect.unwrap(func)
- args, _, _, defaults, _, _, _ = getfullargspec(func)
+ args, _, _, defaults, _, _, _ = inspect.getfullargspec(func)
alen = len(args)
dlen = len(defaults or [])
# Not enough OR Too many
@@ -858,7 +858,7 @@ class Variable:
current = current()
except TypeError:
try:
- getcallargs(current)
+ inspect.getcallargs(current)
except TypeError: # arguments *were* required
current = context.template.engine.string_if_invalid # invalid method call
else: