Skip to content

Commit a9b558c

Browse files
committed
Replace sys.orig_argv with sys.argv
sys.orig_argv is not available in Python 3.9.
1 parent f883c30 commit a9b558c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/elapi/cli/elapi.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def cli_startup(
5252
] = "{}",
5353
) -> type(None):
5454
import click
55-
from sys import orig_argv
55+
from sys import argv
5656
import json
5757
from ..styles import print_typer_error, NoteText
5858
from ..configuration import (
@@ -113,10 +113,7 @@ def cli_startup(
113113
not in COMMANDS_TO_SKIP_CLI_STARTUP
114114
and ctx.command.name != calling_sub_command_name
115115
):
116-
if (
117-
orig_argv[-1] != (ARG_TO_SKIP := "--help")
118-
or ARG_TO_SKIP not in orig_argv
119-
):
116+
if argv[-1] != (ARG_TO_SKIP := "--help") or ARG_TO_SKIP not in argv:
120117
if override_config or not MainConfigurationValidator.ALREADY_VALIDATED:
121118
_validate = Validate(MainConfigurationValidator())
122119
try:

0 commit comments

Comments
 (0)