1#!/usr/bin/env python3
2"""
3
4
5
6"""
7# Import:
8from __future__ import annotations
9
10# ##-- stdlib imports
11import datetime
12import enum
13import functools as ftz
14import itertools as itz
15import logging as logmod
16import pathlib as pl
17import re
18import time
19import types
20import weakref
21from uuid import UUID, uuid1
22# ##-- end stdlib imports
23
24from jgdv._abstract.error import JGDVError
25
26# ##-- types
27# isort: off
28import abc
29import collections.abc
30from typing import TYPE_CHECKING, cast, assert_type, assert_never
31from typing import Generic, NewType, Never
32# Protocols:
33from typing import Protocol, runtime_checkable
34# Typing Decorators:
35from typing import no_type_check, final, override, overload
36
37if TYPE_CHECKING:
38 from jgdv import Maybe
39 from typing import Final
40 from typing import ClassVar, Any, LiteralString
41 from typing import Self, Literal
42 from typing import TypeGuard
43 from collections.abc import Iterable, Iterator, Callable, Generator
44 from collections.abc import Sequence, Mapping, MutableMapping, Hashable
45
46##--|
47
48# isort: on
49# ##-- end types
50
51##-- logging
52logging = logmod.getLogger(__name__)
53##-- end logging
54
55# Global Vars:
56
57# Body:
[docs]
58class ParseError(JGDVError):
59 """ A Base Error Class for JGDV CLI Arg Parsing"""
60 pass
61
[docs]
62class HeadParseError(ParseError):
63 """ For When an error occurs parsing the head """
64 pass
65
[docs]
66class CmdParseError(ParseError):
67 """ For when parsing the command section fails """
68 pass
69
[docs]
70class SubCmdParseError(ParseError):
71 """ For when the subcmd section fails """
72 pass
73
[docs]
74class ArgParseError(ParseError):
75 """ For when a head/cmd/subcmds arguments are bad """
76 pass