Skip to content
Snippets Groups Projects
Commit 1a114121 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: Avoiding another deprecation warning

parent 3f6f90ae
No related branches found
No related tags found
No related merge requests found
...@@ -85,21 +85,22 @@ and returned:: ...@@ -85,21 +85,22 @@ and returned::
""" """
import itertools as it import itertools as it
import os.path as op import os.path as op
import os import collections.abc as abc
import re import os
import sys import re
import glob import sys
import random import glob
import string import random
import fnmatch import string
import inspect import fnmatch
import logging import inspect
import tempfile import logging
import warnings import tempfile
import functools import warnings
import collections import functools
import six import six
import nibabel as nib import nibabel as nib
...@@ -282,7 +283,7 @@ def applyArgStyle(style, valsep=None, argmap=None, valmap=None, **kwargs): ...@@ -282,7 +283,7 @@ def applyArgStyle(style, valsep=None, argmap=None, valmap=None, **kwargs):
# always returns a sequence # always returns a sequence
def fmtval(val): def fmtval(val):
if isinstance(val, collections.Sequence) and \ if isinstance(val, abc.Sequence) and \
not isinstance(val, six.string_types): not isinstance(val, six.string_types):
val = [str(v) for v in val] val = [str(v) for v in val]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment