Skip to content

Commit 833ff2a

Browse files
finish implementation
1 parent f44960b commit 833ff2a

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

linodecli/baked/request.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def __init__( # pylint: disable=too-many-arguments
2727
is_parent: bool = False,
2828
parent: Optional[str] = None,
2929
depth: int = 0,
30-
option_variants: Optional[Dict[Tuple, Self]] = None,
3130
) -> None:
3231
"""
3332
Parses a single Schema node into a argument the CLI can use when making
@@ -127,18 +126,12 @@ def __init__( # pylint: disable=too-many-arguments
127126
"instead of object's properties! This is a programming error."
128127
)
129128

130-
#: A mapping between option keys and argument variants.
131-
#: This is necessary because argparse requires a merged list of options
132-
#: but we still want to preserve these arguments for use in help pages.
133-
self.option_variants = option_variants or {}
134-
135129

136130
def _parse_request_model(
137131
schema: Schema,
138132
prefix: Optional[str] = None,
139133
parent: Optional[str] = None,
140134
depth: int = 0,
141-
option_path: Optional[Tuple[str, ...]] = None,
142135
) -> List[OpenAPIRequestArg]:
143136
"""
144137
Parses an OpenAPI schema into a list of OpenAPIRequest objects
@@ -179,7 +172,6 @@ def _parse_request_model(
179172
# NOTE: We do not increment the depth because dicts do not have
180173
# parent arguments.
181174
depth=depth,
182-
option_path=option_path,
183175
)
184176

185177
# Handle arrays of objects that not marked as JSON
@@ -211,7 +203,6 @@ def _parse_request_model(
211203
prefix=pref,
212204
parent=pref,
213205
depth=depth + 1,
214-
option_path=option_path,
215206
)
216207
else:
217208
args.append(

linodecli/baked/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def __inner(path: List[str], entry: Schema):
3737
for key in entry.required or []:
3838
required[key] += 1
3939

40+
print("SCHEMA FOUND", entry, entry.required, "ROOT", schema)
4041
return
4142

4243
# If there aren't any properties, this could be a

linodecli/help_pages.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import sys
77
import textwrap
88
from collections import defaultdict
9-
from dataclasses import dataclass
109
from typing import Dict, List, Optional
1110

1211
from rich import box

0 commit comments

Comments
 (0)