本文整理汇总了Python中cola.observable.Observable.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Observable.__init__方法的具体用法?Python Observable.__init__怎么用?Python Observable.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cola.observable.Observable
的用法示例。
在下文中一共展示了Observable.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from cola.observable import Observable [as 别名]
# 或者: from cola.observable.Observable import __init__ [as 别名]
def __init__(self, cwd=None):
"""Reads git repository settings and sets several methods
so that they refer to the git module. This object
encapsulates cola's interaction with git."""
Observable.__init__(self)
# Initialize the git command object
self.git = git.instance()
self.head = 'HEAD'
self.diff_text = ''
self.mode = self.mode_none
self.filename = None
self.currentbranch = ''
self.directory = ''
self.project = ''
self.remotes = []
self.commitmsg = ''
self.modified = []
self.staged = []
self.untracked = []
self.unmerged = []
self.upstream_changed = []
self.submodules = set()
self.local_branches = []
self.remote_branches = []
self.tags = []
if cwd:
self.set_worktree(cwd)
示例2: __init__
# 需要导入模块: from cola.observable import Observable [as 别名]
# 或者: from cola.observable.Observable import __init__ [as 别名]
def __init__(self, cwd=None):
"""Reads git repository settings and sets several methods
so that they refer to the git module. This object
encapsulates cola's interaction with git."""
Observable.__init__(self)
# Initialize the git command object
self.git = git.current()
self.head = 'HEAD'
self.diff_text = ''
self.mode = self.mode_none
self.filename = None
self.is_merging = False
self.is_rebasing = False
self.currentbranch = ''
self.directory = ''
self.project = ''
self.remotes = []
self.filter_paths = None
self.commitmsg = '' # current commit message
self._auto_commitmsg = '' # e.g. .git/MERGE_MSG
self._prev_commitmsg = '' # saved here when clobbered by .git/MERGE_MSG
self.modified = [] # modified, staged, untracked, unmerged paths
self.staged = []
self.untracked = []
self.unmerged = []
self.upstream_changed = [] # paths that've changed upstream
self.staged_deleted = set()
self.unstaged_deleted = set()
self.submodules = set()
self.local_branches = []
self.remote_branches = []
self.tags = []
if cwd:
self.set_worktree(cwd)
示例3: __init__
# 需要导入模块: from cola.observable import Observable [as 别名]
# 或者: from cola.observable.Observable import __init__ [as 别名]
def __init__(self, ref, count):
Observable.__init__(self)
self.ref = ref
self.count = count
self.overrides = {}
示例4: __init__
# 需要导入模块: from cola.observable import Observable [as 别名]
# 或者: from cola.observable.Observable import __init__ [as 别名]
def __init__(self):
Model.__init__(self)
Observable.__init__(self)
示例5: __init__
# 需要导入模块: from cola.observable import Observable [as 别名]
# 或者: from cola.observable.Observable import __init__ [as 别名]
def __init__(self):
Observable.__init__(self)
self.staged = []
self.unmerged = []
self.modified = []
self.untracked = []