diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-04 13:48:29 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-04 13:48:29 +0100 |
commit | c80d727e374321573bb00e23876a67c77ff466e3 (patch) | |
tree | 7590d6ae544eac56e83639d27e1f9013b38d8a4b /git/odict.py | |
parent | 965a08c3f9f2fbd62691d533425c699c943cb865 (diff) | |
download | gitpython-c80d727e374321573bb00e23876a67c77ff466e3.tar.gz |
Bumped version, updated changelog, reduced code smell
There is more work to do though, as many imports are still incorrect.
Also, there are still print statements
Diffstat (limited to 'git/odict.py')
-rw-r--r-- | git/odict.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/git/odict.py b/git/odict.py index c4c80499..c505b7fd 100644 --- a/git/odict.py +++ b/git/odict.py @@ -616,8 +616,7 @@ class OrderedDict(dict): TypeError: pop expected at most 2 arguments, got 3 """ if len(args) > 1: - raise TypeError, ('pop expected at most 2 arguments, got %s' % - (len(args) + 1)) + raise TypeError('pop expected at most 2 arguments, got %s' % (len(args) + 1)) if key in self: val = self[key] del self[key] @@ -1199,7 +1198,7 @@ class Values(object): keys = self._main._sequence[index] if len(keys) != len(value): raise ValueError('attempt to assign sequence of size %s ' - 'to slice of size %s' % (len(name), len(keys))) + 'to slice of size %s' % (len(value), len(keys))) # FIXME: efficiency? Would be better to calculate the indexes # directly from the slice object # NOTE: the new keys can collide with existing keys (or even @@ -1511,7 +1510,7 @@ class SequenceOrderedDict(OrderedDict): def __setattr__(self, name, value): """Protect keys, items, and values.""" - if not '_att_dict' in self.__dict__: + if '_att_dict' not in self.__dict__: object.__setattr__(self, name, value) else: try: |