Skip to content

Commit

Permalink
fixed up more py3.9 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Aug 1, 2024
1 parent 6c69233 commit ad0f8cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions frametree/xnat/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def get_provenance(self, entry: DataEntry) -> ty.Dict[str, ty.Any]:
provenance = json.load(f)
return provenance

def create_data_tree(self, id: str, leaves: list[tuple[str, ...]], **kwargs):
def create_data_tree(self, id: str, leaves: ty.List[tuple[str, ...]], **kwargs):
"""Creates a new empty dataset within in the store. Used in test routines and
importing/exporting datasets between stores
Expand Down Expand Up @@ -390,7 +390,7 @@ def upload_files(self, cache_path: Path, entry: DataEntry):

def download_value(
self, entry: DataEntry
) -> ty.Union[float, int, str, list[float], list[int], list[str]]:
) -> ty.Union[float, int, str, ty.List[float], ty.List[int], ty.List[str]]:
"""
Extract and return the value of the field from the store
Expand All @@ -412,7 +412,7 @@ def download_value(

def upload_value(
self,
value: ty.Union[float, int, str, list[float], list[int], list[str]],
value: ty.Union[float, int, str, ty.List[float], ty.List[int], ty.List[str]],
entry: DataEntry,
):
"""Store the value for a field in the XNAT repository
Expand Down
4 changes: 2 additions & 2 deletions frametree/xnat/utils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class TestXnatDatasetBlueprint(TestDatasetBlueprint):

# Overwrite attributes in core blueprint class
space: type = Clinical
hierarchy: list[DataSpace] = ["subject", "session"]
filesets: ty.Optional[list[str]] = None
hierarchy: ty.List[DataSpace] = ["subject", "session"]
filesets: ty.Optional[ty.List[str]] = None

def make_entries(self, row: DataRow, source_data: ty.Optional[Path] = None):
logger.debug("Making entries in %s row: %s", row, self.scans)
Expand Down

0 comments on commit ad0f8cd

Please sign in to comment.