__main__.py 文件源码

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

项目:doctr 作者: drdoctr 项目源码 文件源码
def get_config():
    """
    This load some configuration from the ``.travis.yml``, if file is present,
    ``doctr`` key if present.
    """
    p = Path('.travis.yml')
    if not p.exists():
        return {}
    with p.open() as f:
        travis_config = yaml.safe_load(f.read())

    config = travis_config.get('doctr', {})

    if not isinstance(config, dict):
        raise ValueError('config is not a dict: {}'.format(config))
    return config
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号