-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring - Added utility to simplify drogon identifier comparisons (…
- Loading branch information
1 parent
0eef0de
commit 8dd8da3
Showing
4 changed files
with
35 additions
and
12 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from typing import Optional | ||
|
||
|
||
def is_drogon_identifier( | ||
field_identifier: Optional[str] = None, | ||
wellbore_uuid: Optional[str] = None, | ||
strat_column_identifier: Optional[str] = None, | ||
) -> bool: | ||
""" | ||
Checks if an element's identifier is for the drogon mock. | ||
""" | ||
if field_identifier == "DROGON": | ||
return True | ||
if wellbore_uuid in ["drogon_horizontal", "drogon_vertical"]: | ||
return True | ||
if strat_column_identifier == "DROGON_HAS_NO_STRATCOLUMN": | ||
return True | ||
|
||
return False |