本文整理匯總了Python中cola.observable.Observable類的典型用法代碼示例。如果您正苦於以下問題:Python Observable類的具體用法?Python Observable怎麽用?Python Observable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Observable類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
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__
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__
def __init__(self, ref, count):
Observable.__init__(self)
self.ref = ref
self.count = count
self.overrides = {}
示例4: __init__
def __init__(self):
Model.__init__(self)
Observable.__init__(self)
示例5: __init__
def __init__(self):
Observable.__init__(self)
self.staged = []
self.unmerged = []
self.modified = []
self.untracked = []