Skip to content

Commit b6cf319

Browse files
committed
Minor tweak
1 parent 6ca2483 commit b6cf319

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

bidscoin/bidseditor.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@
2626
from bidscoin.bids import BidsMap, RunItem, DataType
2727
from bidscoin.utilities import is_dicomfile, is_parfile
2828

29-
# 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: [..]"
30-
if not DEBUG:
31-
config.INVALID_KEY_BEHAVIOR = 'IGNORE'
32-
config.IGNORE = 1
29+
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"
30+
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: [..]"
3331

3432
ROW_HEIGHT = 22
3533
BIDSCOIN_LOGO = Path(__file__).parent/'bidscoin_logo.png'

bidscoin/utilities/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
from importlib.util import find_spec
1313
from bidscoin import is_hidden, lsdirs, DEBUG
1414

15-
# 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: [..]"
16-
if not DEBUG:
17-
config.INVALID_KEY_BEHAVIOR = 'IGNORE'
18-
config.IGNORE = 1
15+
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"
16+
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: [..]"
1917

2018
LOGGER = logging.getLogger(__name__)
2119

0 commit comments

Comments
 (0)