Skip to content

Commit

Permalink
ci fail resolve - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
c0sogi committed Aug 22, 2023
1 parent 427d553 commit b101843
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions llama_api/shared/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def load(
environ_key_prefix: str = DEFAULT_ENVIRON_KEY_PREFIX,
) -> None:
"""Load CLI arguments from environment variables and CLI arguments"""
cls.load_from_namespace(cls.parser.parse_args())
cls.load_from_namespace(cls.get_parser().parse_args())
cls.load_from_environ(
environ_key=environ_key, environ_key_prefix=environ_key_prefix
)
Expand Down Expand Up @@ -156,8 +156,7 @@ def iterate_over_cli_args(cls) -> Iterable[Tuple[str, CliArg]]:
yield attr_name, attr_value

@classmethod
@property
def parser(cls) -> argparse.ArgumentParser:
def get_parser(cls) -> argparse.ArgumentParser:
"""Return an argument parser with all CLI arguments"""
arg_parser = argparse.ArgumentParser()
for cli_key, cli_arg in cls.iterate_over_cli_args():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class TestCLIArgs(unittest.TestCase):
def test_cli_args(self):
parser = MainCliArgs.parser
parser = MainCliArgs.get_parser()
environ_key = "LLAMA_CLI_ARGS"
environ_key_prefix = "LLAMA_"

Expand Down

0 comments on commit b101843

Please sign in to comment.