forked from floringhimie/salusfy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcdb1bc
commit 2070cc8
Showing
9 changed files
with
65 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[MAIN] | ||
ignore-paths= | ||
config.py | ||
|
||
disable= | ||
missing-module-docstring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
class EntityRegistry: | ||
"""Registry used for local and test executions.""" | ||
|
||
def __init__(self): | ||
self._entities = [] | ||
self._update_before_add = False | ||
|
||
def register(self, list, **kwargs): | ||
def register(self, entities, **kwargs): | ||
"""Registers the list of entities.""" | ||
self._update_before_add = kwargs.get('update_before_add') | ||
self._entities.extend(list) | ||
self._entities.extend(entities) | ||
|
||
@property | ||
def entities(self): | ||
"""Returns the list of entries registered during configuration.""" | ||
return self._entities | ||
|
||
@property | ||
def first(self): | ||
"""Returns the first entity registered.""" | ||
return self._entities[0] | ||
|
||
@property | ||
def update_before_add(self): | ||
""" | ||
Determines whether the update_before_add value | ||
has been set during configuration. | ||
""" | ||
return self._update_before_add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters