当前位置: 首页>>代码示例>>Python>>正文


Python utils.get_repr函数代码示例

本文整理汇总了Python中qutebrowser.utils.utils.get_repr函数的典型用法代码示例。如果您正苦于以下问题:Python get_repr函数的具体用法?Python get_repr怎么用?Python get_repr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_repr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __repr__

 def __repr__(self):
     try:
         url = utils.elide(self.url().toDisplayString(QUrl.EncodeUnicode),
                           100)
     except AttributeError:
         url = '<AttributeError>'
     return utils.get_repr(self, tab_id=self.tab_id, url=url)
开发者ID:meles5,项目名称:qutebrowser,代码行数:7,代码来源:browsertab.py

示例2: __repr__

 def __repr__(self):
     try:
         url = utils.elide(self.url().toDisplayString(QUrl.EncodeUnicode),
                           100)
     except (AttributeError, RuntimeError) as exc:
         url = '<{}>'.format(exc.__class__.__name__)
     return utils.get_repr(self, tab_id=self.tab_id, url=url)
开发者ID:Harrison97,项目名称:qutebrowser,代码行数:7,代码来源:browsertab.py

示例3: __repr__

 def __repr__(self):
     model = self.model()
     if model is None:
         count = 'None'
     else:
         count = model.rowCount()
     return utils.get_repr(self, count=count)
开发者ID:anweshknayak,项目名称:qutebrowser,代码行数:7,代码来源:downloads.py

示例4: __repr__

 def __repr__(self) -> str:
     try:
         qurl = self.url()
         url = qurl.toDisplayString(QUrl.EncodeUnicode)  # type: ignore
     except (AttributeError, RuntimeError) as exc:
         url = '<{}>'.format(exc.__class__.__name__)
     else:
         url = utils.elide(url, 100)
     return utils.get_repr(self, tab_id=self.tab_id, url=url)
开发者ID:The-Compiler,项目名称:qutebrowser,代码行数:9,代码来源:browsertab.py

示例5: __repr__

 def __repr__(self):
     return utils.get_repr(
         self,
         name=self._name,
         dirty=self._dirty,
         save_handler=self._save_handler,
         config_opt=self._config_opt,
         save_on_exit=self._save_on_exit,
         filename=self._filename,
     )
开发者ID:Konubinix,项目名称:qutebrowser,代码行数:10,代码来源:savemanager.py

示例6: __repr__

 def __repr__(self):
     return utils.get_repr(
         self,
         win_id=self.win_id,
         count=self.count,
         flag=self.flag,
         hide=self.hide,
         metavar=self.metavar,
         completion=self.completion,
         choices=self.choices,
         constructor=True,
     )
开发者ID:shioyama,项目名称:qutebrowser,代码行数:12,代码来源:command.py

示例7: __repr__

 def __repr__(self):
     return utils.get_repr(self, downloads=len(self.downloads))
开发者ID:a2batic,项目名称:qutebrowser,代码行数:2,代码来源:downloads.py

示例8: __repr__

 def __repr__(self):
     return utils.get_repr(self, constructor=True,
                           disposition=self.disposition, assocs=self.assocs)
开发者ID:r8b7xy,项目名称:qutebrowser,代码行数:3,代码来源:rfc6266.py

示例9: __repr__

 def __repr__(self):
     return utils.get_repr(self, visible=self.isVisible())
开发者ID:oatberry,项目名称:qutebrowser,代码行数:2,代码来源:consolewidget.py

示例10: __repr__

 def __repr__(self):
     return utils.get_repr(self)
开发者ID:pyrho,项目名称:qutebrowser,代码行数:2,代码来源:app.py

示例11: __repr__

 def __repr__(self):
     try:
         html = self.debug_text()
     except Error:
         html = None
     return utils.get_repr(self, html=html)
开发者ID:julianuu,项目名称:qutebrowser,代码行数:6,代码来源:webelem.py

示例12: __repr__

 def __repr__(self):
     return utils.get_repr(self, used=self.used, answer=self.answer)
开发者ID:xu-fengfeng,项目名称:qutebrowser,代码行数:2,代码来源:test_urlutils.py

示例13: __repr__

 def __repr__(self):
     return utils.get_repr(self, loops=len(self._loops),
                           question=self._question, queue=len(self._queue),
                           busy=self._busy)
开发者ID:ProtractorNinja,项目名称:qutebrowser,代码行数:4,代码来源:prompter.py

示例14: __repr__

 def __repr__(self):
     url = utils.elide(self.url().toDisplayString(), 50)
     return utils.get_repr(self, tab_id=self.tab_id, url=url)
开发者ID:larryhynes,项目名称:qutebrowser,代码行数:3,代码来源:webview.py

示例15: __repr__

 def __repr__(self):
     return utils.get_repr(self, question=self.question, constructor=True)
开发者ID:michaelbeaumont,项目名称:qutebrowser,代码行数:2,代码来源:prompt.py


注:本文中的qutebrowser.utils.utils.get_repr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。