main.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:kudubot 作者: namboy94 项目源码 文件源码
def parse_args() -> argparse.Namespace:  # pragma: no cover
    """
    Parses the Command Line Arguments using argparse

    :return: The parsed arguments
    """

    parser = argparse.ArgumentParser()
    parser.add_argument("connection", help="The Type of Connection to use")

    parser.add_argument("-v", "--verbose", action="store_true",
                        help="Activates verbose output")
    parser.add_argument("-d", "--debug", action="store_true",
                        help="Activates debug-level logging output")
    parser.add_argument("-q", "--quiet", action="store_true",
                        help="Disables all text output")
    parser.add_argument("-c", "--config",
                        default=os.path.join(os.path.expanduser("~"),
                                             ".kudubot"),
                        help="Overrides the configuration directory location")

    return parser.parse_args()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号