summaryrefslogtreecommitdiff
path: root/astroid/context.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-09-18 18:09:19 +0000
committerClaudiu Popa <pcmanticore@gmail.com>2015-09-18 18:09:19 +0000
commit9ae7562f92f13aceda2b5c0389dd37955ca9e066 (patch)
tree081c2da42ec6e4caf842b2032b0fbdc16e8bc20c /astroid/context.py
parent1f3de3597ac6a60a8eddbad85ec6ef5870cd6e8e (diff)
downloadastroid-git-9ae7562f92f13aceda2b5c0389dd37955ca9e066.tar.gz
Change a couple of readability issues, proper variable names and so on.
Diffstat (limited to 'astroid/context.py')
-rw-r--r--astroid/context.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/astroid/context.py b/astroid/context.py
index 00f779e3..051fab81 100644
--- a/astroid/context.py
+++ b/astroid/context.py
@@ -62,14 +62,16 @@ class InferenceContext(object):
self.path = path
def __str__(self):
- return '%s(%s)' % (type(self).__name__, ',\n '.join(
- ('%s=%s' % (a, pprint.pformat(getattr(self, a), width=80-len(a)))
- for a in self.__slots__)))
+ 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))
def __repr__(self):
- return '%s(%s)' % (type(self).__name__, ', '.join(
- ('%s=%s' % (a, repr(getattr(self, a)))
- for a in self.__slots__)))
+ state = ('%s=%s' % (field, repr(getattr(self, field)))
+ for field in self.__slots__)
+ return '%s(%s)' % (type(self).__name__, ', '.join(state))
+
class CallContext(object):