-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
28 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,50 @@ | ||
from enum import StrEnum | ||
from enum import auto | ||
from enum import Enum | ||
|
||
# Todo when min is 3.11 | ||
# Move to StringEnum and auto | ||
|
||
class Language(StrEnum): | ||
EN = auto() | ||
class Language(Enum): | ||
EN = "en" | ||
"""English""" | ||
FR = auto() | ||
FR = "fr" | ||
"""French""" | ||
DE = auto() | ||
DE = "de" | ||
"""German""" | ||
ES = auto() | ||
ES = "es" | ||
"""Spanish""" | ||
IT = auto() | ||
IT = "it" | ||
"""Italian""" | ||
PT = auto() | ||
PT = "pt" | ||
"""Portuguese""" | ||
|
||
def __str__(self): | ||
return self.name.lower() | ||
|
||
class Extension(StrEnum): | ||
|
||
class Extension(Enum): | ||
"""The different extension an image is available in""" | ||
|
||
PNG = auto() | ||
PNG = "png" | ||
""".png image, with transparent background""" | ||
JPG = auto() | ||
JPG = "jpg" | ||
""".jpg image, with white background""" | ||
WEBP = auto() | ||
WEBP = "webp" | ||
""".webp image, with transparent background""" | ||
|
||
def __str__(self): | ||
return self.name.lower() | ||
|
||
|
||
class Quality(StrEnum): | ||
class Quality(Enum): | ||
""" | ||
Image quality if applicable | ||
(only cards does have quality selector) | ||
""" | ||
|
||
HIGH = auto() | ||
HIGH = "high" | ||
"""the string representation of the quality""" | ||
LOW = auto() | ||
LOW = "low" | ||
"""A Low quality image""" | ||
|
||
def __str__(self): | ||
return self.name.lower() |
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