-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Description
Just like the Enum package has enum.IntEnum, pystac should like have a StrEnum class. It doesn't have to be much, I since there are a bunch of them, it would be a bit cleaner.
class StrEnum(str, Enum):
pass
- https://docs.python.org/3/library/enum.html#others
- https://docs.python.org/3/library/enum.html#intenum
find pystac -name \*.py | xargs grep Enum | grep str
pystac/extensions/__init__.py:class Extensions(str, Enum):
pystac/extensions/label.py:class LabelType(str, Enum):
pystac/link.py:class LinkType(str, Enum):
pystac/stac_object.py:class STACObjectType(str, Enum):
pystac/catalog.py:class CatalogType(str, Enum):
pystac/media_type.py:class MediaType(str, Enum):
After trying it a bit, I don't think it needs any extra code.
Hmmmm... StrEnum is in python 3.10, so, maybe not. Idonno.
Metadata
Metadata
Assignees
Labels
No labels