-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixing #36 * fixing #38 - runtime protocol checks * removing test protocol that isn't used and causes issues with isinstance against ErrorKeeper
- Loading branch information
1 parent
a912b21
commit d5cac93
Showing
3 changed files
with
9 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,30 +1,25 @@ | ||
from typing import Protocol | ||
from typing import Protocol, runtime_checkable | ||
|
||
from screenpy import Answerable, ErrorKeeper, Forgettable, Performable | ||
from screenpy import Answerable, Describable, Forgettable, Performable | ||
|
||
from screenpy_selenium import Chainable | ||
|
||
|
||
class Describable(Protocol): | ||
def describe(self) -> str: | ||
... | ||
|
||
|
||
@runtime_checkable | ||
class Question(Answerable, Describable, Protocol): | ||
... | ||
|
||
|
||
class ErrorQuestion(Answerable, Describable, ErrorKeeper, Protocol): | ||
... | ||
|
||
|
||
@runtime_checkable | ||
class Action(Performable, Describable, Protocol): | ||
... | ||
|
||
|
||
@runtime_checkable | ||
class ChainableAction(Chainable, Performable, Describable, Protocol): | ||
... | ||
|
||
|
||
@runtime_checkable | ||
class Ability(Forgettable, Protocol): | ||
... |