From 1663cf42054931cb8bd4f00b0f7abf1becbafaa2 Mon Sep 17 00:00:00 2001 From: Ajit Johnson Nirmal Date: Wed, 20 Nov 2024 17:58:52 -0500 Subject: [PATCH] move warning --- scimap/plotting/gate_finder.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scimap/plotting/gate_finder.py b/scimap/plotting/gate_finder.py index 9f45e56f..26f4cc02 100644 --- a/scimap/plotting/gate_finder.py +++ b/scimap/plotting/gate_finder.py @@ -15,12 +15,7 @@ import warnings -warnings.warn( - "gate_finder() is deprecated and will be removed in a future version. " - "Please use sm.pl.napariGater() instead.", - FutureWarning, - stacklevel=2, -) + try: import napari @@ -141,6 +136,13 @@ def gate_finder( ``` """ + warnings.warn( + "gate_finder() is deprecated and will be removed in a future version. " + "Please use sm.pl.napariGater() instead.", + FutureWarning, + stacklevel=2, + ) + # If no raw data is available make a copy if adata.raw is None: adata.raw = adata