Skip to content

Commit

Permalink
fix: all enums now inherit from str
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Feb 7, 2023
1 parent c622f06 commit 846af05
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions arguebuf/dump/_config.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from __future__ import annotations

from dataclasses import dataclass
from enum import Enum, auto
from enum import Enum

__all__ = ("Format", "Config")


class Format(Enum):
class Format(str, Enum):
ARGUEBUF = "arguebuf"
AIF = "aif"

Expand Down
8 changes: 4 additions & 4 deletions arguebuf/model/scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__all__ = ("Scheme", "Support", "Attack", "Preference", "Rephrase")


class Support(Enum):
class Support(str, Enum):
"""Enumeration of all available Argumentation Schemes (Walton et al.)
.. autoclasssumm:: Support
Expand Down Expand Up @@ -88,7 +88,7 @@ class Support(Enum):
# DEFINITION = "Definition"


class Attack(Enum):
class Attack(str, Enum):
"""Enumeration of attacking schemes
.. autoclasssumm:: Attack
Expand All @@ -98,7 +98,7 @@ class Attack(Enum):
DEFAULT = "Default"


class Preference(Enum):
class Preference(str, Enum):
"""Enumeration of preference schemes
.. autoclasssumm:: Preference
Expand All @@ -108,7 +108,7 @@ class Preference(Enum):
DEFAULT = "Default"


class Rephrase(Enum):
class Rephrase(str, Enum):
"""Enumeration of rephrase schemes
.. autoclasssumm:: Rephrase
Expand Down
2 changes: 1 addition & 1 deletion arguebuf/schemas/graphviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
GraphvizGraph = t.Union[Digraph, t.Any]


class EdgeStyle(Enum):
class EdgeStyle(str, Enum):
BEZIER = "curved"
STRAIGHT = "line"
STEP = "ortho"
2 changes: 1 addition & 1 deletion arguebuf/schemas/microtexts.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum


class EdgeType(Enum):
class EdgeType(str, Enum):
SEGMENTATION = "seg"
SUPPORT_DEFAULT = "sup"
SUPPORT_EXAMPLE = "exa"
Expand Down

0 comments on commit 846af05

Please sign in to comment.