Skip to content

Commit 17f649d

Browse files
committed
Black formatting
1 parent 59dda25 commit 17f649d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

jsonpickle/util.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,13 +406,17 @@ def is_reducible(obj):
406406
# defaultdicts may contain functions which we cannot serialise
407407
if is_collections(obj) and not isinstance(obj, collections.defaultdict):
408408
return True
409-
# We turn off the formatting in order to double the speed of the function.
410-
# Condensing it into one line seems to save the parser a lot of time.
411-
# fmt: off
412-
# pylint: disable=line-too-long
413-
if type(obj) in NON_REDUCIBLE_TYPES or obj is object or is_dictionary_subclass(obj) or isinstance(obj, types.ModuleType) or is_reducible_sequence_subclass(obj) or is_list_like(obj) or isinstance(getattr(obj, '__slots__', None), _ITERATOR_TYPE) or (is_type(obj) and obj.__module__ == 'datetime'): # noqa: E501
409+
if (
410+
type(obj) in NON_REDUCIBLE_TYPES
411+
or obj is object
412+
or is_dictionary_subclass(obj)
413+
or isinstance(obj, types.ModuleType)
414+
or is_reducible_sequence_subclass(obj)
415+
or is_list_like(obj)
416+
or isinstance(getattr(obj, '__slots__', None), _ITERATOR_TYPE)
417+
or (is_type(obj) and obj.__module__ == 'datetime')
418+
):
414419
return False
415-
# fmt: on
416420
return True
417421

418422

0 commit comments

Comments
 (0)