diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-10-02 09:43:56 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-10-02 09:43:56 +0200 |
commit | add5f7b8eba427de9d39caae864bbc6dc37ef980 (patch) | |
tree | 86bb7df77f389062879365e97df0c3d53d38a8a6 /astroid/context.py | |
parent | bb46cd198b93f3715da94089d42f39fc910892ff (diff) | |
download | astroid-git-add5f7b8eba427de9d39caae864bbc6dc37ef980.tar.gz |
Initial formatting of astroid
Diffstat (limited to 'astroid/context.py')
-rw-r--r-- | astroid/context.py | 21 |
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): """ |