"""References to non-style modules used by the style package."""
# This module is a simple facade to the functionality used by the
# style package that comes from WebKit modules outside the style
# package.
#
# With this module, the only intra-package references (i.e.
# references to webkitpy modules outside the style folder) that
# the style package needs to make are relative references to
# this module. For example--
#
# > from .. style_references import parse_patch
#
# Similarly, people maintaining non-style code are not beholden
# to the contents of the style package when refactoring or
# otherwise changing non-style code. They only have to be aware
# of this module.
import os
from diff_parser import DiffParser
from scm import detect_scm_system
def parse_patch(patch_string):
"""Parse a patch string and return the affected files."""
patch = DiffParser(patch_string.splitlines())
return patch.files
class SimpleScm(object):
"""Simple facade to SCM for use by style package."""
def __init__(self):
cwd = os.path.abspath('.')
self._scm = detect_scm_system(cwd)
def checkout_root(self):
"""Return the source control root as an absolute path."""
return self._scm.checkout_root
def create_patch(self):
return self._scm.create_patch()
def create_patch_since_local_commit(self, commit):
return self._scm.create_patch_since_local_commit(commit)
没有合适的资源?快使用搜索试试~ 我知道了~
style_references.rar_style
共2个文件
bak:1个
py:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 151 浏览量
2022-09-23
16:19:26
上传
评论
收藏 4KB RAR 举报
温馨提示
References to non-style modules used by the style package.
资源推荐
资源详情
资源评论
收起资源包目录
style_references.rar (2个子文件)
style_references.py 1KB
gtest_test_utils.py.bak 7KB
共 2 条
- 1
资源评论
刘良运
- 粉丝: 67
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功