Source code for pyndoc.ast.helpers
import re
from enum import Enum
from collections import UserList
from typing import TypedDict
[docs]
class NumberingType(Enum):
DECIMAL = 1
ALPHABETIC = 2
ROMAN_NUMERALS = 3
def __str__(self) -> str:
return self.name
[docs]
class Separator(Enum):
PERIOD = 1
CLOSING_PAREN = 2
def __str__(self) -> str:
return self.name
[docs]
class Alignment(Enum):
ALIGN_DEFAULT = 1
ALIGN_CENTER = 2
ALIGN_LEFT = 3
ALIGN_RIGHT = 4
def __str__(self) -> str:
return self.name
[docs]
class AlignmentList(UserList):
def __str__(self) -> str:
return "[" + ", ".join(str(item) for item in self.data) + "]"