@property
    def directions(self):
        hashes = []
        t_query = """select trip_headsign, trip_short_name, bikes_allowed,
        trip_id from trips where route_id=:route_id and _feed=:_feed"""
        t_filter = {'route_id': self.id, '_feed': self.provider.feed_id}
        cur = self.provider.conn.cursor()
        for trip in cur.execute(t_query, t_filter):
            direction = {}
            innercur = self.provider.conn.cursor()
            result = innercur.execute(
                """select s.* from stop_times as st join stops as s
                on st.stop_id=s.stop_id and st._feed=s._feed
                where st.trip_id=:t_id and st._feed=:_feed""",
                {'t_id': trip['trip_id'], '_feed': self.provider.feed_id})
            direction['stops'] = [GTFSStop(self.provider, **dict(row))
                                  for row in result]
            if trip['trip_headsign'] is not None:
                direction['headsign'] = trip['trip_headsign']
            if trip['trip_short_name'] is not None:
                direction['short_name'] = trip['trip_short_name']
            if trip['bikes_allowed'] is not None:
                direction['bikes_ok'] = trip['bikes_allowed']
            h = util.freezehash(direction)
            if hashes not in h:
                hashes.append(h)
                yield direction
dataset/ETHPy150Open spaceboats/busbus/busbus/provider/gtfs.py/GTFSRoute.directions/swapped operands of `not in`