Skip to content

Commit

Permalink
Lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestofgonzalez committed Sep 16, 2021
1 parent 0e55e32 commit 2902ca2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dynamic_rest/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
class DynamicSerializerBase(object):

"""Base class for all DREST serializers."""

pass


Expand All @@ -15,7 +16,7 @@ def resettable_cached_property(func):
"""

def wrapper(self):
if not hasattr(self, '_resettable_cached_properties'):
if not hasattr(self, "_resettable_cached_properties"):
self._resettable_cached_properties = {}
if func.__name__ not in self._resettable_cached_properties:
self._resettable_cached_properties[func.__name__] = func(self)
Expand All @@ -32,7 +33,7 @@ def cacheable_object(cls):
"""

def reset(self):
if hasattr(self, '_resettable_cached_properties'):
if hasattr(self, "_resettable_cached_properties"):
self._resettable_cached_properties = {}

cls.reset = reset
Expand All @@ -56,4 +57,4 @@ def root(self):

@resettable_cached_property
def context(self):
return getattr(self.root, '_context', {})
return getattr(self.root, "_context", {})

0 comments on commit 2902ca2

Please sign in to comment.