本文整理汇总了Python中Utils.Object.item方法的典型用法代码示例。如果您正苦于以下问题:Python Object.item方法的具体用法?Python Object.item怎么用?Python Object.item使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utils.Object
的用法示例。
在下文中一共展示了Object.item方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from Utils import Object [as 别名]
# 或者: from Utils.Object import item [as 别名]
def run(self, paths = [], input = False, content = ''):
if input == False:
SideBarGit().prompt('Enter a commit message: ', '', self.run, paths)
elif content != '':
import sys
content = (content[0].upper() + content[1:]).encode(sys.getfilesystemencoding())
for repo in SideBarGit().getSelectedRepos(SideBarSelection(paths).getSelectedItems()):
commitCommandAdd = ['git', 'add', '--']
commitCommandCommit = ['git', 'commit', '-m', content, '--']
for item in repo.items:
commitCommandAdd.append(item.forCwdSystemPathRelativeFromRecursive(repo.repository.path()))
commitCommandCommit.append(item.forCwdSystemPathRelativeFrom(repo.repository.path()))
object = Object()
object.item = repo.repository
object.command = commitCommandAdd
SideBarGit().run(object)
object = Object()
object.item = repo.repository
object.to_status_bar = True
object.command = commitCommandCommit
SideBarGit().run(object)
object = Object()
object.item = repo.repository
object.command = ['git','push']
SideBarGit().run(object, True)
示例2: run
# 需要导入模块: from Utils import Object [as 别名]
# 或者: from Utils.Object import item [as 别名]
def run(self, paths = []):
for item in SideBarSelection(paths).getSelectedItems():
object = Object()
object.item = item
object.command = ['git', 'reflog', '--no-color', '--', item.forCwdSystemName()]
object.title = 'Reflog: '+item.name()
object.syntax_file = 'Packages/Git/Git Graph.tmLanguage'
SideBarGit().run(object)
示例3: on_done
# 需要导入模块: from Utils import Object [as 别名]
# 或者: from Utils.Object import item [as 别名]
def on_done(self, extra, data, result):
result = data[result].strip()
if result.startswith("*"):
return
else:
import sys
branch = result.split(' ')[0]
object = Object()
object.item = extra
object.command = ['git', 'branch', '-d', branch.encode(sys.getfilesystemencoding())]
object.to_status_bar = True
SideBarGit().run(object)