Skip to content

Commit

Permalink
Avoid generating pydicom user warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Sep 27, 2024
1 parent 3626ddc commit 3d19215
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bidscoin/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from functools import lru_cache
from pathlib import Path
from typing import List, Set, Tuple, Union, Dict, Any, Iterable, NewType
from pydicom import dcmread, fileset
from pydicom import dcmread, fileset, config
from importlib.util import find_spec
if find_spec('bidscoin') is None:
import sys
Expand All @@ -32,6 +32,7 @@
from ruamel.yaml import YAML
yaml = YAML()
yaml.representer.ignore_aliases = lambda *data: True # Expand aliases (https://stackoverflow.com/questions/58091449/disabling-alias-for-yaml-file-in-python)
config.INVALID_KEY_BEHAVIOR = 'IGNORE'

# Define custom data types (replace with proper classes or TypeAlias of Python >= 3.10)
Plugin = NewType('Plugin', Dict[str, Any])
Expand Down

0 comments on commit 3d19215

Please sign in to comment.