From 2157cf9c32ff9a70e97203eb0338cd5af8811b5e Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 12:37:12 +0200 Subject: [PATCH] Remove assert statement from non-test files (#84) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- ifpd2/probe.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ifpd2/probe.py b/ifpd2/probe.py index a66853b7..eb231e9f 100644 --- a/ifpd2/probe.py +++ b/ifpd2/probe.py @@ -582,7 +582,8 @@ def select_probe_from_pair(probeA, probeB): @staticmethod def import_probes(ipath): # Imports output from given directory path - assert os.path.isdir(ipath) + if not os.path.isdir(ipath): + raise AssertionError pPath = os.path.join(ipath, "probe_paths.tsv") if not os.path.isfile(pPath): @@ -603,7 +604,8 @@ def import_probes(ipath): @staticmethod def export_probes(probe_list, opath): # Exports a list of probes to a directory - assert os.path.isdir(opath) + if not os.path.isdir(opath): + raise AssertionError probe_df = pd.concat([p.featDF for p in probe_list], ignore_index=True) probe_df.sort_values("start", inplace=True)