script_bindings(python): Add type around js jit class in codegen.py (#38998)

Add type around js jit class in codegen.py

Needed this PR: #38845

---------

Signed-off-by: Jerens Lensun <jerensslensun@gmail.com>
This commit is contained in:
Jerens Lensun 2025-09-01 15:00:03 +08:00 committed by GitHub
parent 9d5aa9973a
commit fc5691a293
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 222 additions and 203 deletions

File diff suppressed because it is too large Load diff

View file

@ -25,6 +25,7 @@ from WebIDL import (
IDLCallback,
IDLAttribute,
IDLMethod,
IDLInterfaceMember,
)
TargetType = TypeVar('TargetType')
@ -448,7 +449,7 @@ class Descriptor(DescriptorProvider):
def supportsNamedProperties(self) -> bool:
return self.operations['NamedGetter'] is not None
def getExtendedAttributes(self, member: IDLMethod, getter: bool = False, setter: bool = False) -> list[str]:
def getExtendedAttributes(self, member: IDLInterfaceMember, getter: bool = False, setter: bool = False) -> list[str]:
def maybeAppendInfallibleToAttrs(attrs: list[str], throws: bool | None) -> None:
if throws is None:
attrs.append("infallible")