Skip to content

Commit

Permalink
Fixed List type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
ecerami committed Mar 21, 2023
1 parent fecbd60 commit 99a09a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions hdash/synapse/meta_map.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import List
from hdash.synapse.meta_file import MetaFile


Expand Down Expand Up @@ -25,10 +26,10 @@ def has_category(self, category: str):
"""Determine if the MetaMap has data for the specified category."""
return category in self.map

def get_meta_file_list(self, category: str) -> list[MetaFile]:
def get_meta_file_list(self, category: str) -> List[MetaFile]:
"""Get the List of Meta Files Associated with the Specified Category."""
return self.map.get(category, [])

def get_categories(self) -> list[str]:
def get_categories(self) -> List[str]:
"""Get the list of all registered categories in the map."""
return self.map.keys()
5 changes: 3 additions & 2 deletions hdash/validator/htan_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pandas as pd

from typing import List
from hdash.validator.categories import Categories
from hdash.validator.validation_rule import ValidationRule
from hdash.validator.validate_demographics import ValidateDemographics
Expand All @@ -18,7 +19,7 @@
class HtanValidator:
"""Core HTAN Validator."""

def __init__(self, atlas_id, meta_data_file_list: list[MetaFile]):
def __init__(self, atlas_id, meta_data_file_list: List[MetaFile]):
"""Construct a new HTAN Validator for one atlas."""
self.atlas_id = atlas_id
self.validation_list = []
Expand All @@ -32,7 +33,7 @@ def __init__(self, atlas_id, meta_data_file_list: list[MetaFile]):
# Then validate
self.__validate()

def get_validation_list(self) -> list[ValidationRule]:
def get_validation_list(self) -> List[ValidationRule]:
"""Get the list of validation rules applied."""
return self.validation_list

Expand Down

0 comments on commit 99a09a4

Please sign in to comment.