summaryrefslogtreecommitdiff
path: root/pylint/checkers/strings.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/strings.py')
-rw-r--r--pylint/checkers/strings.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pylint/checkers/strings.py b/pylint/checkers/strings.py
index 5fb9a44..31f025d 100644
--- a/pylint/checkers/strings.py
+++ b/pylint/checkers/strings.py
@@ -24,7 +24,6 @@ import string
import numbers
import astroid
-from astroid import helpers
from pylint.interfaces import ITokenChecker, IAstroidChecker, IRawChecker
from pylint.checkers import BaseChecker, BaseTokenChecker
@@ -206,7 +205,7 @@ def get_args(callfunc):
is the keyword arguments in a dict.
"""
if callfunc.keywords:
- named = {arg.arg: helpers.safe_infer(arg.value)
+ named = {arg.arg: utils.safe_infer(arg.value)
for arg in callfunc.keywords}
else:
named = {}
@@ -333,12 +332,12 @@ class StringMethodsChecker(BaseChecker):
@check_messages(*(MSGS.keys()))
def visit_call(self, node):
- func = helpers.safe_infer(node.func)
+ func = utils.safe_infer(node.func)
if (isinstance(func, astroid.BoundMethod)
and isinstance(func.bound, astroid.Instance)
and func.bound.name in ('str', 'unicode', 'bytes')):
if func.name in ('strip', 'lstrip', 'rstrip') and node.args:
- arg = helpers.safe_infer(node.args[0])
+ arg = utils.safe_infer(node.args[0])
if not isinstance(arg, astroid.Const):
return
if len(arg.value) != len(set(arg.value)):