本文整理汇总了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)
示例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)
示例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)
示例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)
示例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,
)
示例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,
)
示例7: __repr__
def __repr__(self):
return utils.get_repr(self, downloads=len(self.downloads))
示例8: __repr__
def __repr__(self):
return utils.get_repr(self, constructor=True,
disposition=self.disposition, assocs=self.assocs)
示例9: __repr__
def __repr__(self):
return utils.get_repr(self, visible=self.isVisible())
示例10: __repr__
def __repr__(self):
return utils.get_repr(self)
示例11: __repr__
def __repr__(self):
try:
html = self.debug_text()
except Error:
html = None
return utils.get_repr(self, html=html)
示例12: __repr__
def __repr__(self):
return utils.get_repr(self, used=self.used, answer=self.answer)
示例13: __repr__
def __repr__(self):
return utils.get_repr(self, loops=len(self._loops),
question=self._question, queue=len(self._queue),
busy=self._busy)
示例14: __repr__
def __repr__(self):
url = utils.elide(self.url().toDisplayString(), 50)
return utils.get_repr(self, tab_id=self.tab_id, url=url)
示例15: __repr__
def __repr__(self):
return utils.get_repr(self, question=self.question, constructor=True)