Skip to content

Commit

Permalink
fix mypy typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
s-bessey committed Feb 15, 2023
1 parent a27b361 commit 7fa17a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion titan/features/high_risk.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def set_stats(self, stats: Dict[str, int], time: int):
# ============== HELPER METHODS ================

def become_high_risk(
self, pop: "population.Population", time: int, duration: int = None
self, pop: "population.Population", time: int, duration: Optional[int] = None
):
"""
Mark an agent as high risk and assign a duration to their high risk period
Expand Down
6 changes: 3 additions & 3 deletions titan/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ def step(self, outdir: str):
" STARTING HIV count:{} Total Incarcerated:{} HR+:{} "
"PrEP:{}".format(
len(exposures.HIV.agents),
sum([1 for a in self.pop.all_agents if a.incar.active]), # type: ignore[attr-defined]
sum([1 for a in self.pop.all_agents if a.high_risk.active]), # type: ignore[attr-defined]
sum([1 for a in self.pop.all_agents if a.prep.active]), # type: ignore[attr-defined]
sum([1 for a in self.pop.all_agents if a.incar.active]), # type: ignore[misc, attr-defined]
sum([1 for a in self.pop.all_agents if a.high_risk.active]), # type: ignore[misc, attr-defined]
sum([1 for a in self.pop.all_agents if a.prep.active]), # type: ignore[misc, attr-defined]
)
)

Expand Down

0 comments on commit 7fa17a4

Please sign in to comment.