This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
forked from maxpumperla/elephas
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d27e695
commit 8eaf2d6
Showing
8 changed files
with
62 additions
and
34 deletions.
There are no files selected for viewing
Empty file.
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,22 @@ | ||
import sys | ||
|
||
if sys.version_info.minor < 11: | ||
# Devs using version < 3.11 can use the str enum mixin | ||
from enum import Enum | ||
|
||
|
||
class Mode(str, Enum): | ||
SYNCHRONOUS: str = 'synchronous' | ||
ASYNCHRONOUS: str = 'asynchronous' | ||
HOGWILD: str = 'hogwild' | ||
else: | ||
# Devs using version >= 3.11 can use the strenum builtin, | ||
# but that breaks the mixin implementation | ||
# https://github.com/python/cpython/issues/100458 | ||
from enum import StrEnum, auto | ||
|
||
|
||
class Mode(StrEnum): | ||
SYNCHRONOUS = auto() | ||
ASYNCHRONOUS = auto() | ||
HOGWILD = auto() |
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