settings.py 文件源码

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

项目:pythonVSCode 作者: DonJayamanne 项目源码 文件源码
def should_skip(filename, config, path='/'):
    """Returns True if the file should be skipped based on the passed in settings."""
    for skip_path in config['skip']:
        if posixpath.abspath(posixpath.join(path, filename)) == posixpath.abspath(skip_path.replace('\\', '/')):
            return True

    position = os.path.split(filename)
    while position[1]:
        if position[1] in config['skip']:
            return True
        position = os.path.split(position[0])

    for glob in config['skip_glob']:
        if fnmatch.fnmatch(filename, glob):
            return True

    return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号