-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add application states #1974
Conversation
8610daa
to
7fc23ae
Compare
@Lancetnik |
Oh, sorry, missed that one |
c9045b1
to
af0dbda
Compare
I changed the pull request to 0.0.6. I see that the StartAbleApplication class has its own state, but it relates to dependency injection. I suggest considering renaming it to _di_state. |
@Artem-Safronov I designed this state is a single state for the app, so we should extend it by your functional instead of renaming |
Ok. I was confused that this is an instance of the DIState class. Then I will extend it with the attribute state. |
It is not a problem, we can add special |
Also, I am not sure about I imagine smth like class ApplicationState(ABC):
def __init__(self, di_state) -> None:
self._di_state = di_state
@property
def running(self) -> bool: ...
class BasicApplicationState(ApplicationState):
@property
def running(self) -> bool:
return False
class RunningApplicationState(ApplicationState):
@property
def running(self) -> bool:
return True |
af0dbda
to
ccedcc3
Compare
Description
Hello. While writing the test for launching the application, I encountered the need to check the application's active state. I suggest adding two states for the application: "stopped" and "running".
Type of change
Please delete options that are not relevant.
Checklist
scripts/lint.sh
shows no errors)scripts/test-cov.sh
scripts/static-analysis.sh