BUG: Fix bar data contains check when override is used.

The override should be used to filter out symbols not in the universe,
however it was returning false positives.

To remove the false positives, after the contains check passes,
ensure that the key exists in the _data member.
This commit is contained in:
Eddie Hebert
2013-05-23 11:37:12 -04:00
parent 25d6f3afd1
commit 6c6b45659b
+4 -1
View File
@@ -140,7 +140,10 @@ class BarData(object):
def __contains__(self, name):
if self._contains_override:
return self._contains_override(name)
if self._contains_override(name):
return name in self._data
else:
return False
else:
return name in self._data