diff --git a/zipline/gens/utils.py b/zipline/gens/utils.py index 585f5ce1..9bd8f2c5 100644 --- a/zipline/gens/utils.py +++ b/zipline/gens/utils.py @@ -39,7 +39,6 @@ def hash_args(*args, **kwargs): def assert_datasource_protocol(event): """Assert that an event meets the protocol for datasource outputs.""" - assert isinstance(event.source_id, basestring) assert event.type in DATASOURCE_TYPE # Done packets have no dt. @@ -61,17 +60,14 @@ def assert_trade_protocol(event): def assert_datasource_unframe_protocol(event): """Assert that an event is valid output of zp.DATASOURCE_UNFRAME.""" - assert isinstance(event.source_id, basestring) assert event.type in DATASOURCE_TYPE def assert_sort_protocol(event): """Assert that an event is valid input to zp.FEED_FRAME.""" - assert isinstance(event.source_id, basestring) assert event.type in DATASOURCE_TYPE def assert_sort_unframe_protocol(event): """Same as above.""" - assert isinstance(event.source_id, basestring) assert event.type in DATASOURCE_TYPE diff --git a/zipline/transforms/utils.py b/zipline/transforms/utils.py index 8f6d6801..bccff29d 100644 --- a/zipline/transforms/utils.py +++ b/zipline/transforms/utils.py @@ -17,7 +17,6 @@ """ Generator versions of transforms. """ -import types import logbook @@ -92,8 +91,6 @@ class StatefulTransform(object): Otherwise only dt, tnfm_id, and tnfm_value are forwarded. """ def __init__(self, tnfm_class, *args, **kwargs): - assert isinstance(tnfm_class, (types.ObjectType, types.ClassType)), \ - "Stateful transform requires a class." assert hasattr(tnfm_class, 'update'), \ "Stateful transform requires the class to have an update method"