mirror of
https://github.com/servo/servo.git
synced 2025-09-14 17:08:22 +01:00
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:
parent
9d5aa9973a
commit
fc5691a293
2 changed files with 222 additions and 203 deletions
File diff suppressed because it is too large
Load diff
|
@ -25,6 +25,7 @@ from WebIDL import (
|
||||||
IDLCallback,
|
IDLCallback,
|
||||||
IDLAttribute,
|
IDLAttribute,
|
||||||
IDLMethod,
|
IDLMethod,
|
||||||
|
IDLInterfaceMember,
|
||||||
)
|
)
|
||||||
|
|
||||||
TargetType = TypeVar('TargetType')
|
TargetType = TypeVar('TargetType')
|
||||||
|
@ -448,7 +449,7 @@ class Descriptor(DescriptorProvider):
|
||||||
def supportsNamedProperties(self) -> bool:
|
def supportsNamedProperties(self) -> bool:
|
||||||
return self.operations['NamedGetter'] is not None
|
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:
|
def maybeAppendInfallibleToAttrs(attrs: list[str], throws: bool | None) -> None:
|
||||||
if throws is None:
|
if throws is None:
|
||||||
attrs.append("infallible")
|
attrs.append("infallible")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue