From b6cf3190c963e62aef38d9f4e01e7003b012bdbd Mon Sep 17 00:00:00 2001 From: Marcel Zwiers Date: Wed, 5 Feb 2025 08:21:33 +0100 Subject: [PATCH] Minor tweak --- bidscoin/bidseditor.py | 6 ++---- bidscoin/utilities/__init__.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/bidscoin/bidseditor.py b/bidscoin/bidseditor.py index c483f8f1..9094dd80 100755 --- a/bidscoin/bidseditor.py +++ b/bidscoin/bidseditor.py @@ -26,10 +26,8 @@ from bidscoin.bids import BidsMap, RunItem, DataType from bidscoin.utilities import is_dicomfile, is_parfile -# Ignore pydicom warnings, such as "The value length (68) exceeds the maximum length of 64 allowed for VR LO" and "Invalid value for VR UI: [..]" -if not DEBUG: - config.INVALID_KEY_BEHAVIOR = 'IGNORE' - config.IGNORE = 1 +config.INVALID_KEY_BEHAVIOR = 'IGNORE' # Ignores warnings such as "UserWarning: Invalid value 'filepath' used with the 'in' operator: must be an element tag as a 2-tuple or int, or an element" +config.IGNORE = 0 if DEBUG else 1 # Ignores warnings such as "The value length (68) exceeds the maximum length of 64 allowed for VR LO" and "Invalid value for VR UI: [..]" ROW_HEIGHT = 22 BIDSCOIN_LOGO = Path(__file__).parent/'bidscoin_logo.png' diff --git a/bidscoin/utilities/__init__.py b/bidscoin/utilities/__init__.py index 62c6419a..9d5701b2 100644 --- a/bidscoin/utilities/__init__.py +++ b/bidscoin/utilities/__init__.py @@ -12,10 +12,8 @@ from importlib.util import find_spec from bidscoin import is_hidden, lsdirs, DEBUG -# Ignore pydicom warnings, such as "The value length (68) exceeds the maximum length of 64 allowed for VR LO" and "Invalid value for VR UI: [..]" -if not DEBUG: - config.INVALID_KEY_BEHAVIOR = 'IGNORE' - config.IGNORE = 1 +config.INVALID_KEY_BEHAVIOR = 'IGNORE' # Ignores warnings such as "UserWarning: Invalid value 'filepath' used with the 'in' operator: must be an element tag as a 2-tuple or int, or an element" +config.IGNORE = 0 if DEBUG else 1 # Ignores warnings such as "The value length (68) exceeds the maximum length of 64 allowed for VR LO" and "Invalid value for VR UI: [..]" LOGGER = logging.getLogger(__name__)