Skip to content

Commit

Permalink
Format with black and ssort
Browse files Browse the repository at this point in the history
  • Loading branch information
Theelx committed Aug 13, 2023
1 parent bf3b5e2 commit 6bc2580
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/jsonpickle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ def test_depth_tracking(self):
self.pickler.flatten([l, l, l, l, l])
self.assertEqual(self.pickler._depth, -1)


class PicklableNamedTuple(object):
"""
A picklable namedtuple wrapper, to demonstrate the need
Expand Down
8 changes: 4 additions & 4 deletions tests/object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ class ThingWithDefaultFactoryRegistry:
class ThingWithDefaultFactory:
"""Class that ensures that provides a default factory"""

def __new__(cls, *args, **kwargs):
"""Ensure that jsonpickle uses our constructor during initialization"""
return super().__new__(cls, *args, **kwargs)

def __init__(self):
self.default_factory = self.__class__
# Keep track of how many times this constructor has been run.
ThingWithDefaultFactoryRegistry.count += 1

def __new__(cls, *args, **kwargs):
"""Ensure that jsonpickle uses our constructor during initialization"""
return super().__new__(cls, *args, **kwargs)


class IntEnumTest(enum.IntEnum):
X = 1
Expand Down

0 comments on commit 6bc2580

Please sign in to comment.