Skip to content

Commit f010389

Browse files
committed
Clean up interface a little
1 parent 40b6fb3 commit f010389

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/ReadVars/ReadVarsESO.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858

5959
MODERN_COMMAND_ALIASES = {
6060
"--list": "list",
61-
"--variables": "list",
6261
"--read": "read",
6362
}
6463

@@ -178,7 +177,7 @@ def is_modern_cli(argv: list[str]) -> bool:
178177
return False
179178

180179
first = argv[0].lower()
181-
return first in {"list", "variables", "read", "-h", "--help"} or first in MODERN_COMMAND_ALIASES
180+
return first in {"list", "read", "-h", "--help"} or first in MODERN_COMMAND_ALIASES
182181

183182

184183
def normalized_modern_args(argv: list[str]) -> list[str]:
@@ -207,7 +206,7 @@ def build_modern_parser() -> argparse.ArgumentParser:
207206
)
208207
subparsers = parser.add_subparsers(dest="command")
209208

210-
list_parser = subparsers.add_parser("list", aliases=["variables"], help="List variables in an ESO/MTR data dictionary.")
209+
list_parser = subparsers.add_parser("list", help="List variables in an ESO/MTR data dictionary.")
211210
list_parser.add_argument("input_file", nargs="?", default="eplusout.eso", help="ESO/MTR file to inspect.")
212211
list_parser.add_argument(
213212
"-f",
@@ -923,7 +922,7 @@ def run_modern_cli(argv: list[str]) -> int:
923922
return 0
924923

925924
try:
926-
if args.command in {"list", "variables"}:
925+
if args.command == "list":
927926
records = filter_modern_records(records_for_modern_cli(args.input_file), args.frequency, args.search)
928927
write_records(records, args.format)
929928
return 0

0 commit comments

Comments
 (0)