Skip to content

Commit

Permalink
💬 update type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Oct 17, 2023
1 parent cb2d999 commit e768ad9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion arpes/endstations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def find_first_file(
scan_desc: SCANDESC,
*,
allow_soft_match: bool = False,
) -> NoReturn | None:
) -> str | Path:
"""Attempts to find file associated to the scan given the user provided path or scan number.
This is mostly done by regex matching over available options.
Expand Down Expand Up @@ -476,6 +476,7 @@ def load(self, scan_desc: SCANDESC | None = None, **kwargs: Incomplete) -> xr.Da
self.trace("Resolving frame locations")
resolved_frame_locations = self.resolve_frame_locations(scan_desc)
resolved_frame_locations = [str(f) for f in resolved_frame_locations]
self.trace(f"resolved_frame_locations: {resolved_frame_locations}")
if not resolved_frame_locations:
msg = "File not found"
raise RuntimeError(msg)
Expand Down
4 changes: 2 additions & 2 deletions arpes/endstations/plugin/SPD_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ def postprocess_final(

def load_single_frame(
self,
frame_path: str = "",
frame_path: str | Path = "",
scan_desc: SCANDESC | None = None,
**kwargs: str | float,
) -> xr.Dataset:
"""Load a single frame from an PHOIBOS 100 spectrometer with Prodigy.
Args:
frame_path(str): _description_, by default ""
frame_path(str | Path): _description_, by default ""
scan_desc(dict[str, str] | None): _description_, by default None
kwargs(str | int | float): Pass to load_itx
Expand Down

0 comments on commit e768ad9

Please sign in to comment.