Skip to content

Commit

Permalink
Renamed class attribute '__subclassevents__' to respect the naming
Browse files Browse the repository at this point in the history
convention for model objects ("don't trample on user namespace").
  • Loading branch information
johnbywater committed Nov 9, 2019
1 parent 9400c78 commit e6b3bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions eventsourcing/domain/model/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@

class DomainEntityMeta(type):

subclassevents = False
__subclassevents__ = False

def __init__(cls, name, bases, attrs):
super().__init__(name, bases, attrs)
if cls.subclassevents:
if cls.__subclassevents__:
subclassevents(cls)


class DomainEntity(metaclass=DomainEntityMeta):
"""
Supertype for domain model entity.
"""
subclassevents = False
__subclassevents__ = False

class Event(EventWithOriginatorID, DomainEvent):
"""
Expand Down
2 changes: 1 addition & 1 deletion eventsourcing/tests/core_tests/test_aggregate_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def count_examples(self):


class Aggregate2(ExampleAggregateRoot):
subclassevents = True
__subclassevents__ = True

def __init__(self, foo="", **kwargs):
super(Aggregate2, self).__init__(**kwargs)
Expand Down

0 comments on commit e6b3bd9

Please sign in to comment.