PyQt5 : strange QUrl.FormattingOptions
Phil Thompson
phil at riverbankcomputing.com
Tue Nov 23 17:54:29 GMT 2021
On 13/11/2021 15:30, Philippe Fremy wrote:
> Hi,
>
> While working on PyQt5-stubs, I noticed that
> QtCore.QUrl.FormattingOptions is kind of strangely generated.
>
> Usually, all QFlag based classes come with a few constructors and
> methods. For example, QUrlComponentFormattingOptions comes like this:
>
> class ComponentFormattingOptions(sip.simplewrapper):
>
> @typing.overload
> def __init__(self) -> None: ...
> @typing.overload
> def __init__(self, f:
> typing.Union['QUrl.ComponentFormattingOptions',
> 'QUrl.ComponentFormattingOption']) -> None: ...
> @typing.overload
> def __init__(self, a0: 'QUrl.ComponentFormattingOptions') ->
> None: ...
>
> def __hash__(self) -> int: ...
> def __bool__(self) -> int: ...
> def __invert__(self) -> 'QUrl.ComponentFormattingOptions': ...
> def __index__(self) -> int: ...
> def __int__(self) -> int: ...
>
>
> However, for QUrl.FormattingOptions, the QFlag based class is extremely
> simple:
>
> class FormattingOptions(sip.simplewrapper):
>
> def __init__(self, a0: 'QUrl.FormattingOptions') -> None: ...
>
>
> It's kind of odd, so I imagine this is a bug.
Should be fixed in the next snapshot.
Thanks,
Phil
More information about the PyQt
mailing list