From 5001cf53b7f9e8d67cc5cd4befb5c0bce7aa3a81 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sat, 10 Nov 2018 22:20:45 -0800 Subject: [PATCH] travis: enable pylint in python3 mode Signed-off-by: David Aguilar --- .travis.yml | 3 +-- cola/ordered_dict.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc23f1cf..88d4ea69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,8 +42,7 @@ script: # Run tests - make test V=2 - pylint --version - # Only run the full pylint tests on python2.7 - - test "2.7" != "$TRAVIS_PYTHON_VERSION" || make pylint + - make pylint - make pylint3k - flake8 --version - make flake8 diff --git a/cola/ordered_dict.py b/cola/ordered_dict.py index af93e780..898f7af3 100644 --- a/cola/ordered_dict.py +++ b/cola/ordered_dict.py @@ -246,6 +246,9 @@ class OrderedDict(dict): d[key] = value return d + def __hash__(self): + return hash(frozenset(self.items())) + def __eq__(self, other): '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. -- 2.11.4.GIT