mypy: ignore enum argument type: UrlFormattingOption
The docs say: > The options from QUrl::ComponentFormattingOptions are also possible. > The FormattingOptions type is a typedef for QFlags<UrlFormattingOption>. It stores an OR combination of UrlFormattingOption values. Maybe we should be should be definining out own types for some of the enums that include both the QFlag, enum and any child enums.
This commit is contained in:
parent
1bbf75ae7d
commit
b64fdfc584
|
|
@ -1322,7 +1322,8 @@ class AbstractTab(QWidget):
|
|||
def __repr__(self) -> str:
|
||||
try:
|
||||
qurl = self.url()
|
||||
url = qurl.toDisplayString(QUrl.ComponentFormattingOption.EncodeUnicode)
|
||||
as_unicode = QUrl.ComponentFormattingOption.EncodeUnicode
|
||||
url = qurl.toDisplayString(as_unicode) # type: ignore[arg-type]
|
||||
except (AttributeError, RuntimeError) as exc:
|
||||
url = '<{}>'.format(exc.__class__.__name__)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue