Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/location/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ def serialize(self):
}


class TimelinedLocation(Location):
class TimelinedLocation:
"""
A location with timelines.
"""

# pylint: disable=too-many-arguments
def __init__(self, id, country, province, coordinates, last_updated, timelines):
super().__init__(
def __init__(self, id, country, province, coordinates, last_updated, timelines, location):
Location.__init__(
# General info.
id,
country,
Expand All @@ -96,6 +96,7 @@ def __init__(self, id, country, province, coordinates, last_updated, timelines):

# Set timelines.
self.timelines = timelines
self.location = Location

# pylint: disable=arguments-differ
def serialize(self, timelines=False):
Expand Down
8 changes: 5 additions & 3 deletions app/location/csbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
from . import Location


class CSBSLocation(Location):
class CSBSLocation:
"""
A CSBS (county) location.
"""

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

self.state = state
self.county = county
self.location = Location


def serialize(self, timelines=False): # pylint: disable=arguments-differ,unused-argument
"""
Expand Down
7 changes: 4 additions & 3 deletions app/location/nyt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
from . import TimelinedLocation


class NYTLocation(TimelinedLocation):
class NYTLocation:
"""
A NYT (county) Timelinedlocation.
"""

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

self.state = state
self.county = county
self.timelinedLocation = TimelinedLocation

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