main.py 文件源码

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

项目:gopythongo 作者: gopythongo 项目源码 文件源码
def _find_default_mounts() -> Set[str]:
    global config_paths
    basepath = os.getcwd()
    miniparser = configargparse.ArgumentParser()
    miniparser.add_argument(*args_for_setting_config_path, dest="config", action="append",
                            default=[])
    args, _ = miniparser.parse_known_args()

    # type: ignore, because mypy doesn't parse add_argument above correctly
    if not args.config:
        args.config = default_config_files

    paths = set()
    paths.add(basepath)
    for cfg in args.config:
        if os.path.isfile(cfg):
            paths.add(os.path.abspath(os.path.dirname(cfg)))
            config_paths.add(os.path.abspath(os.path.dirname(cfg)))
    return paths
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号