Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added argcomplete to _cli.py #2

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/openai/cli/_cli.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
from __future__ import annotations

import sys
import logging
import argparse
import argcomplete
from typing import Any, List, Type, Optional
from typing_extensions import ClassVar

Expand Down Expand Up @@ -162,6 +165,7 @@ def _parse_args(parser: argparse.ArgumentParser) -> tuple[argparse.Namespace, Ar

def _main() -> None:
parser = _build_parser()
argcomplete.autocomplete(parser)
parsed, args, unknown = _parse_args(parser)

if args.verbosity != 0:
Expand Down