Skip to content

Commit

Permalink
simplify qp_formatter to remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Aug 1, 2024
1 parent 3cc9676 commit 08fefdf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions python/lsst/meas/pz/qp_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ def read_from_local_file(
pytype = self.file_descriptor.storageClass.pytype
if not issubclass(pytype, qp.Ensemble):
raise TypeError(f"Python type {pytype} does not seem to be a qp.Ensemble")
retval = qp.read(path) # type: ignore
if not isinstance(retval, qp.Ensemble):
raise TypeError(
f"Read object {type(retval)} does not seem to be a qp.Ensemble"
)
return retval
return qp.read(path) # type: ignore

def write_local_file(self, in_memory_dataset: Any, uri: ResourcePath) -> None:
in_memory_dataset.writeto(uri.ospath)

0 comments on commit 08fefdf

Please sign in to comment.