Skip to content

Commit 1b74c4e

Browse files
Change from string literal to public constant
1 parent cd9795f commit 1b74c4e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/imcflibs/imagej/misc.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
from . import bioformats as bf
1717
from . import prefs
1818

19+
from org.scijava.widget import WidgetStyle
20+
from org.scijava.widget import TextWidget
21+
1922

2023
def show_status(msg):
2124
"""Update the ImageJ status bar and issue a log message.
@@ -746,9 +749,8 @@ def save_script_parameters(destination, save_file_name="script_parameters.txt"):
746749
if any(skip in key.upper() for skip in skip_keys):
747750
continue
748751

749-
# Skip if parameter is declared with style="password"
750-
style = item.getWidgetStyle()
751-
if style is not None and style.lower() == "password":
752+
# Skip if parameter is declared with password style
753+
if WidgetStyle.isStyle(item, TextWidget.PASSWORD_STYLE):
752754
continue
753755

754756
if inputs.containsKey(key):

0 commit comments

Comments
 (0)