Describe the bug
class Carousel in pywa/types/templates.py, defines params in a way, that is not acceptable for type checkers. The usage of self=None to check whether or not the function is called as a class function or an instance function (same as other template components like BodyText.params(), HeaderText.params(), etc.) works at runtime, but type checkers report that None is invalid in place of self.
Faulty source code:
def params(self=None, *, cards: list[CarouselCard._Params]) -> Carousel._Params:
"""
Fill the parameters for the carousel component.
Args:
[...]
"""
[...]
All other template components work with class-level calls without type errors:
BodyText.params("hello") # Works - no type error
HeaderImage.params(image="url") # Works - no type error
Carousel.params(cards=[...]) # Type error: "None" not assignable to "self"
The difference is that Carousel uses explicit self=None parameter while others use the *positionals pattern in a private _params helper.
To Reproduce
import pywa.types.templates as pywa_template
# Class-level call - this triggers type error
carousel_params = pywa_template.Carousel.params(cards=[])
Actual Result (type checker):
Argument of type "None" cannot be assigned to parameter "self" of type "Carousel" in function "params"

Expected behavior
No type error; should work like other template components.
pywa version
3.9.0
python version
3.13.13
os
Debian GNU/Linux 13 (image -> python:3.13-slim)
Additional context
Suggested Fix: Change implementation to use *args-style pattern like other components.
Describe the bug
class Carouselinpywa/types/templates.py, definesparamsin a way, that is not acceptable for type checkers. The usage ofself=Noneto check whether or not the function is called as a class function or an instance function (same as other template components like BodyText.params(), HeaderText.params(), etc.) works at runtime, but type checkers report thatNoneis invalid in place ofself.Faulty source code:
All other template components work with class-level calls without type errors:
The difference is that Carousel uses explicit
self=Noneparameter while others use the*positionalspattern in a private_paramshelper.To Reproduce
Actual Result (type checker):

Argument of type "None" cannot be assigned to parameter "self" of type "Carousel" in function "params"
Expected behavior
No type error; should work like other template components.
pywa version
3.9.0
python version
3.13.13
os
Debian GNU/Linux 13 (image -> python:3.13-slim)
Additional context
Suggested Fix: Change implementation to use *args-style pattern like other components.