diff --git a/brainglobe_utils/IO/surfaces.py b/brainglobe_utils/IO/surfaces.py index a7fdf78..392b865 100644 --- a/brainglobe_utils/IO/surfaces.py +++ b/brainglobe_utils/IO/surfaces.py @@ -5,7 +5,7 @@ def marching_cubes_to_obj( - marching_cubes_out: Tuple["NDArray"], output_file: Union[str, "Path"] + marching_cubes_out: Tuple[NDArray], output_file: Union[str, Path] ): """ Saves the output of skimage.measure.marching_cubes as an .obj file diff --git a/brainglobe_utils/IO/yaml.py b/brainglobe_utils/IO/yaml.py index 1616b87..c61d26b 100644 --- a/brainglobe_utils/IO/yaml.py +++ b/brainglobe_utils/IO/yaml.py @@ -4,7 +4,7 @@ import yaml -def read_yaml_section(yaml_file: Union[str, "Path"], section: str) -> Any: +def read_yaml_section(yaml_file: Union[str, Path], section: str) -> Any: """ Read section from yaml file. @@ -24,7 +24,7 @@ def read_yaml_section(yaml_file: Union[str, "Path"], section: str) -> Any: return contents -def open_yaml(yaml_file: Union[str, "Path"]) -> Dict[str, Any]: +def open_yaml(yaml_file: Union[str, Path]) -> Dict[str, Any]: """ Read the contents of a yaml file. @@ -45,7 +45,7 @@ def open_yaml(yaml_file: Union[str, "Path"]) -> Dict[str, Any]: def save_yaml( yaml_contents: Dict[str, Any], - output_file: Union[str, "Path"], + output_file: Union[str, Path], default_flow_style: Optional[bool] = False, ): """ diff --git a/brainglobe_utils/general/pathlib.py b/brainglobe_utils/general/pathlib.py index 0639d6b..1e8da82 100644 --- a/brainglobe_utils/general/pathlib.py +++ b/brainglobe_utils/general/pathlib.py @@ -1,7 +1,7 @@ from pathlib import Path -def append_to_pathlib_stem(path: "Path", string_to_append: str): +def append_to_pathlib_stem(path: Path, string_to_append: str): """ Appends a string to the stem of a pathlib object. diff --git a/brainglobe_utils/general/string.py b/brainglobe_utils/general/string.py index b6759bc..777c5be 100644 --- a/brainglobe_utils/general/string.py +++ b/brainglobe_utils/general/string.py @@ -7,7 +7,7 @@ def get_text_lines( - file: "Path", + file: Path, return_lines: Optional[int] = None, rstrip: Optional[bool] = True, sort: Optional[bool] = False,