Skip to content

Commit 3443048

Browse files
committed
app/location/ aggregate1
1 parent 1c7e4ae commit 3443048

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

app/location/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ def serialize(self):
7474
}
7575

7676

77-
class TimelinedLocation(Location):
77+
class TimelinedLocation:
7878
"""
7979
A location with timelines.
8080
"""
8181

8282
# pylint: disable=too-many-arguments
83-
def __init__(self, id, country, province, coordinates, last_updated, timelines):
84-
super().__init__(
83+
def __init__(self, id, country, province, coordinates, last_updated, timelines, location):
84+
Location.__init__(
8585
# General info.
8686
id,
8787
country,
@@ -96,6 +96,7 @@ def __init__(self, id, country, province, coordinates, last_updated, timelines):
9696

9797
# Set timelines.
9898
self.timelines = timelines
99+
self.location = Location
99100

100101
# pylint: disable=arguments-differ
101102
def serialize(self, timelines=False):

app/location/csbs.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
from . import Location
33

44

5-
class CSBSLocation(Location):
5+
class CSBSLocation:
66
"""
77
A CSBS (county) location.
88
"""
99

1010
# pylint: disable=too-many-arguments,redefined-builtin
11-
def __init__(self, id, state, county, coordinates, last_updated, confirmed, deaths):
12-
super().__init__(
11+
def __init__(self, id, state, county, coordinates, last_updated, confirmed, deaths, location):
12+
Location.__init__(
1313
# General info.
1414
id,
1515
"US",
@@ -24,6 +24,8 @@ def __init__(self, id, state, county, coordinates, last_updated, confirmed, deat
2424

2525
self.state = state
2626
self.county = county
27+
self.location = Location
28+
2729

2830
def serialize(self, timelines=False): # pylint: disable=arguments-differ,unused-argument
2931
"""

app/location/nyt.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
from . import TimelinedLocation
33

44

5-
class NYTLocation(TimelinedLocation):
5+
class NYTLocation:
66
"""
77
A NYT (county) Timelinedlocation.
88
"""
99

1010
# pylint: disable=too-many-arguments,redefined-builtin
11-
def __init__(self, id, state, county, coordinates, last_updated, timelines):
12-
super().__init__(id, "US", state, coordinates, last_updated, timelines)
11+
def __init__(self, id, state, county, coordinates, last_updated, timelines, timelinedLocation):
12+
TimelinedLocation.__init__(id, "US", state, coordinates, last_updated, timelines)
1313

1414
self.state = state
1515
self.county = county
16+
self.timelinedLocation = TimelinedLocation
1617

1718
def serialize(self, timelines=False): # pylint: disable=arguments-differ,unused-argument
1819
"""

0 commit comments

Comments
 (0)