21 lines
454 B
Python
21 lines
454 B
Python
from enum import Enum
|
|
|
|
class OptType(Enum):
|
|
AbstractOpt # only used by Opt
|
|
Flag
|
|
Option
|
|
|
|
class Opt:
|
|
_TYPE: OptType = OptType.AbstractOpt
|
|
def __init__(self, *args) -> None:
|
|
pass
|
|
|
|
class Flag(Opt):
|
|
_TYPE: OptType = OptType.Flag
|
|
def __init__(self, *args) -> None:
|
|
super().__init__(*args)
|
|
|
|
class Option(Opt):
|
|
_TYPE: OptType = OptType.Option
|
|
def __init__(self, *args) -> None:
|
|
super().__init__(*args)
|