Skip to content

Commit

Permalink
Minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Feb 5, 2025
1 parent 6ca2483 commit b6cf319
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions bidscoin/bidseditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 2 additions & 4 deletions bidscoin/utilities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down

0 comments on commit b6cf319

Please sign in to comment.