當前位置: 首頁>>代碼示例>>Python>>正文


Python Observable.__init__方法代碼示例

本文整理匯總了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)
開發者ID:akestner,項目名稱:git-cola,代碼行數:33,代碼來源:model.py

示例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)
開發者ID:gwood,項目名稱:git-cola,代碼行數:41,代碼來源:main.py

示例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 = {}
開發者ID:mwh,項目名稱:git-cola,代碼行數:7,代碼來源:model.py

示例4: __init__

# 需要導入模塊: from cola.observable import Observable [as 別名]
# 或者: from cola.observable.Observable import __init__ [as 別名]
 def __init__(self):
     Model.__init__(self)
     Observable.__init__(self)
開發者ID:johnpaulett,項目名稱:git-cola,代碼行數:5,代碼來源:observable.py

示例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 = []
開發者ID:SecuraPaWn,項目名稱:git-cola,代碼行數:8,代碼來源:selection.py


注:本文中的cola.observable.Observable.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。