Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
All the "Path"s

Co-authored-by: Kimberly Meechan <[email protected]>
  • Loading branch information
willGraham01 and K-Meech authored Apr 11, 2024
1 parent f516f63 commit 27cdba4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion brainglobe_utils/IO/surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions brainglobe_utils/IO/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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,
):
"""
Expand Down
2 changes: 1 addition & 1 deletion brainglobe_utils/general/pathlib.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion brainglobe_utils/general/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 27cdba4

Please sign in to comment.