Merge pull request #29 from l0b0/fix/Sequence

fix: Correct reference to `Sequence`
This commit is contained in:
David Beazley 2023-07-25 18:43:56 -05:00 committed by GitHub
commit 09c35c10df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View File

@ -175,7 +175,7 @@ function.
import collections
...
class RideData(collections.Sequence):
class RideData(collections.abc.Sequence):
def __init__(self):
self.routes = [] # Columns
self.dates = []
@ -204,7 +204,7 @@ into 4 separate `append()` operations.
# readrides.py
...
class RideData(collections.Sequence):
class RideData(collections.abc.Sequence):
def __init__(self):
# Each value is a list with all of the values (a column)
self.routes = []

View File

@ -93,7 +93,7 @@ def read_rides_as_columns(filename):
# The great "fake"
import collections
class RideData(collections.Sequence):
class RideData(collections.abc.Sequence):
def __init__(self):
# Each value is a list with all of the values (a column)
self.routes = []

View File

@ -88,7 +88,7 @@ def read_rides_as_columns(filename):
# The great "fake"
import collections
class RideData(collections.Sequence):
class RideData(collections.abc.Sequence):
def __init__(self):
# Each value is a list with all of the values (a column)
self.routes = []

View File

@ -3,7 +3,7 @@
import collections
import csv
class DataCollection(collections.Sequence):
class DataCollection(collections.abc.Sequence):
def __init__(self, columns):
self.column_names = list(columns)
self.column_data = list(columns.values())
@ -34,4 +34,3 @@ if __name__ == '__main__':
tracemalloc.start()
data = read_csv_as_columns('../../Data/ctabus.csv', [intern, intern, intern, int])
print(tracemalloc.get_traced_memory())