Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
patricktnast committed Dec 13, 2023
1 parent 0b0e814 commit f05de48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MaternalInterventions:
@property
def name(self) -> str:
return "maternal_interventions"

def columns_created(self) -> List[str]:
return ["intervention"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ def on_initialize_simulants(self, pop_data: SimulantData) -> None:

def sample_pregnancy_outcomes_and_durations(self, pop_data: SimulantData) -> pd.DataFrame:
# Order the columns so that partial_term isn't in the middle!
outcome_probabilities = self.birth_outcome_probabilities(pop_data.index)[["partial_term", "stillbirth", "live_birth"]]
outcome_probabilities = self.birth_outcome_probabilities(pop_data.index)[
["partial_term", "stillbirth", "live_birth"]
]
pregnancy_outcomes = pd.DataFrame(
{
"pregnancy_outcome": self.randomness.choice(
Expand Down Expand Up @@ -158,15 +160,14 @@ def get_initial_event_times(self, pop_data: SimulantData) -> pd.DataFrame:


class PregnancyModel(DiseaseModel):

def __init__(self, cause: str, **kwargs):
super().__init__(cause, **kwargs)
self._name = f"disease_model.{cause}"

@property
def time_step_priority(self) -> int:
return 3

def setup(self, builder: Builder):
"""Perform this component's setup."""
super(DiseaseModel, self).setup(builder)
Expand Down Expand Up @@ -198,6 +199,7 @@ def setup(self, builder: Builder):
builder.event.register_listener("time_step", self.on_time_step, priority=3)
builder.event.register_listener("time_step__cleanup", self.on_time_step_cleanup)


def Pregnancy():
not_pregnant = NotPregnantState(models.PREGNANT_STATE_NAME)
pregnant = PregnantState(
Expand Down

0 comments on commit f05de48

Please sign in to comment.