We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In #187 Gtk.Template.Call was changed to be "generic". However this change breaks existing code with the mypy type checker for me:
Gtk.Template.Call
@Gtk.Template class Foo: bar = cast(Adw.ActionRow, Gtk.Template.Child())
This fails with:
error: Attribute function "Child" with type "Callable[[], Any]" does not accept self argument [misc]
I think this isn't actually because of the Cast, but rather because the definition is wrong?
Shouldn't it be:
class Template: ... @classmethod def Child(cls) -> Any: ...
Note the cls. This fixes the issue for me.
cls
mypy version: 1.13.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In #187
Gtk.Template.Call
was changed to be "generic". However this change breaks existing code with the mypy type checker for me:This fails with:
I think this isn't actually because of the Cast, but rather because the definition is wrong?
Shouldn't it be:
Note the
cls
. This fixes the issue for me.mypy version: 1.13.0
The text was updated successfully, but these errors were encountered: