-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
![Screenshot 2024-08-06 at 10 25 54 AM](https://github.com/user-attachments/assets/b6e4ea28-e894-41b3-88ad-64552395c4f6)
- Loading branch information
1 parent
5772f30
commit de5dabb
Showing
11 changed files
with
563 additions
and
43 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,25 @@ | ||
from typing import Dict, Optional, Union, Any | ||
|
||
|
||
class _SDK_Configs: | ||
_flags: Dict[str, bool] = {} | ||
_configs: Dict[str, Any] = {} | ||
|
||
@staticmethod | ||
def set_flags(new_flags): | ||
_SDK_Configs._flags = new_flags | ||
|
||
@staticmethod | ||
def set_configs(new_configs): | ||
_SDK_Configs._configs = new_configs | ||
|
||
@staticmethod | ||
def on(key): | ||
return _SDK_Configs._flags.get(key, False) is True | ||
|
||
@staticmethod | ||
def get_config_num_value(config: str) -> Optional[Union[int, float]]: | ||
value = _SDK_Configs._configs.get(config) | ||
if isinstance(value, (int, float)): | ||
return value | ||
return None |
This file was deleted.
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
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.