From 007ef746f4129effaa60b11d1bfc079bdfe03fa5 Mon Sep 17 00:00:00 2001 From: Ashley Whetter Date: Mon, 20 Aug 2018 11:01:07 -0700 Subject: [PATCH] Fixed linter again --- autoapi/mappers/astroid_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoapi/mappers/astroid_utils.py b/autoapi/mappers/astroid_utils.py index 96ae99b..05be345 100644 --- a/autoapi/mappers/astroid_utils.py +++ b/autoapi/mappers/astroid_utils.py @@ -11,7 +11,8 @@ import astroid.nodes if sys.version_info < (3,): _EXCEPTIONS_MODULE = "exceptions" - _STRING_TYPES = (str, unicode) + # getattr to keep linter happy + _STRING_TYPES = getattr(builtins, 'basestring') else: _EXCEPTIONS_MODULE = "builtins" _STRING_TYPES = str