Skip to content

Commit

Permalink
Make it (slightly) easier to subclass registry
Browse files Browse the repository at this point in the history
- Have a dedicated _init as the override entry point.
  • Loading branch information
metatoaster committed Jul 27, 2016
1 parent edb8db0 commit 09f800b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/calmjs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ def __init__(self, registry_name):
"""

self.registry_name = registry_name
self._init()

def _init(self):
"""
Subclasses can override this instead to set instance attributes.
"""

def register_entry_points(self, entry_points):
"""
Expand Down

0 comments on commit 09f800b

Please sign in to comment.