-
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.
Merge pull request #17 from kuczynskimaciej1/Sending
Sending
- Loading branch information
Showing
10 changed files
with
125 additions
and
138 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,29 @@ | ||
from abc import abstractmethod | ||
|
||
|
||
class IDataSource(): | ||
current_instance = None | ||
|
||
@classmethod | ||
def __subclasshook__(cls, subclass: type) -> bool: | ||
return (hasattr(subclass, 'GetData') and | ||
callable(subclass.GetData) and | ||
hasattr(subclass, 'checkIntegrity') and | ||
callable(subclass.checkIntegrity) and | ||
hasattr(subclass, 'LoadSavedState') and | ||
callable(subclass.LoadSavedState) | ||
) | ||
|
||
@abstractmethod | ||
def GetData(self): | ||
raise RuntimeError | ||
|
||
@abstractmethod | ||
def checkIntegrity(self): | ||
raise RuntimeError | ||
|
||
@abstractmethod | ||
def LoadSavedState(self): | ||
"""Collect all data saved in data source and instantiate adjacent model objects | ||
""" | ||
raise RuntimeError |
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
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
Oops, something went wrong.