Skip to content

Commit

Permalink
type correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Jul 27, 2023
1 parent 3b0f667 commit cde233b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions therapy/etl/chembl.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def _get_indications(self, value: Optional[str]) -> List[Dict]:
for group in set(indication_groups):
ind_group = group.split("||")
phase = self._get_approval_rating(float(ind_group[4]))
indication = {}
indication: Dict[str, Union[str, Dict]] = {}
for i, term in enumerate(ind_group[:4]):
normalized_disease_id = self._normalize_disease(term)
if normalized_disease_id is not None:
label = ind_group[2] if i % 2 == 0 else ind_group[3]
disease_id = ind_group[0] if i % 2 == 0 else ind_group[1]
indication: Dict[str, Union[str, Dict]] = {
indication = {
"disease_id": disease_id,
"disease_label": label,
"normalized_disease_id": normalized_disease_id,
Expand Down

0 comments on commit cde233b

Please sign in to comment.