403Webshell
Server IP : 146.190.157.162  /  Your IP : 216.73.217.110
Web Server : Apache
System : Linux ubuntu-s-2vcpu-4gb-amd-sfo3-01-KIT-DIGITAL 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:10:09 UTC 2024 x86_64
User : businessweek ( 639)
PHP Version : 8.2.10-2ubuntu2.2
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_signal,pcntl_signal_dispatch,pcntl_getpriority,pcntl_setpriority,dl,putenv,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/keyring/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/keyring/completion.py
import argparse
import sys

try:
    import shtab
except ImportError:
    pass

if sys.version_info < (3, 9):
    from importlib_resources import files
else:
    from importlib.resources import files


class _MissingCompletionAction(argparse.Action):
    def __call__(self, parser, namespace, values, option_string):
        print("Install keyring[completion] for completion support.")
        parser.exit(0)


def add_completion_notice(parser):
    """Add completion argument to parser."""
    parser.add_argument(
        "--print-completion",
        choices=["bash", "zsh", "tcsh"],
        action=_MissingCompletionAction,
        help="print shell completion script",
    )
    return parser


def get_action(parser, option):
    (match,) = (action for action in parser._actions if option in action.option_strings)
    return match


def install_completion(parser):
    preamble = dict(
        zsh=files(__package__).joinpath('backend_complete.zsh').read_text(),
    )
    shtab.add_argument_to(parser, preamble=preamble)
    get_action(parser, '--keyring-path').completion = shtab.DIR
    get_action(parser, '--keyring-backend').completion = dict(zsh='backend_complete')
    return parser


def install(parser):
    try:
        install_completion(parser)
    except NameError:
        add_completion_notice(parser)

Youez - 2016 - github.com/yon3zu
LinuXploit