summaryrefslogtreecommitdiff
path: root/astroid/context.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-10-02 09:43:56 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2018-10-02 09:43:56 +0200
commitadd5f7b8eba427de9d39caae864bbc6dc37ef980 (patch)
tree86bb7df77f389062879365e97df0c3d53d38a8a6 /astroid/context.py
parentbb46cd198b93f3715da94089d42f39fc910892ff (diff)
downloadastroid-git-add5f7b8eba427de9d39caae864bbc6dc37ef980.tar.gz
Initial formatting of astroid
Diffstat (limited to 'astroid/context.py')
-rw-r--r--astroid/context.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/astroid/context.py b/astroid/context.py
index 3b50d99d..1d6dab5c 100644
--- a/astroid/context.py
+++ b/astroid/context.py
@@ -20,7 +20,14 @@ class InferenceContext:
Account for already visited nodes to infinite stop infinite recursion
"""
- __slots__ = ('path', 'lookupname', 'callcontext', 'boundnode', 'inferred', 'extra_context')
+ __slots__ = (
+ "path",
+ "lookupname",
+ "callcontext",
+ "boundnode",
+ "inferred",
+ "extra_context",
+ )
def __init__(self, path=None, inferred=None):
self.path = path or set()
@@ -117,16 +124,18 @@ class InferenceContext:
self.path = path
def __str__(self):
- state = ('%s=%s' % (field, pprint.pformat(getattr(self, field),
- width=80 - len(field)))
- for field in self.__slots__)
- return '%s(%s)' % (type(self).__name__, ',\n '.join(state))
+ state = (
+ "%s=%s"
+ % (field, pprint.pformat(getattr(self, field), width=80 - len(field)))
+ for field in self.__slots__
+ )
+ return "%s(%s)" % (type(self).__name__, ",\n ".join(state))
class CallContext:
"""Holds information for a call site."""
- __slots__ = ('args', 'keywords')
+ __slots__ = ("args", "keywords")
def __init__(self, args, keywords=None):
"""