Skip to content

Commit 9b5c5d4

Browse files
committed
Rename default_timeout in make_class to timeout
Theoretically, it might have been used as a keyword argument by some client or other. Signed-off-by: mulhern <amulhern@redhat.com>
1 parent 9fc1661 commit 9b5c5d4

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/dbus_python_client_gen/_invokers.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,15 +418,15 @@ def builder(namespace: MutableMapping[str, Callable]) -> None:
418418
return builder
419419

420420

421-
def make_class(name: str, spec: ET.Element, default_timeout: int = -1) -> Type:
421+
def make_class(name: str, spec: ET.Element, timeout: int = -1) -> Type:
422422
"""
423423
Make a class, name, from the given spec.
424424
The class defines static properties and methods according to the spec.
425425
426426
:param str name: the name of the class.
427427
:param spec: the interface specification
428428
:type spec: xml.element.ElementTree.Element
429-
:param int default_timeout: D-Bus timeout, -1 is libdbus default ~25s
429+
:param int timeout: D-Bus timeout, -1 is libdbus default ~25s
430430
:returns: the constructed class
431431
:rtype: type
432432
"""
@@ -437,11 +437,9 @@ def make_class(name: str, spec: ET.Element, default_timeout: int = -1) -> Type:
437437
raise DPClientGenerationError("No name attribute found for interface") from err
438438

439439
method_builder_arg = method_builder(
440-
interface_name, spec.findall("./method"), default_timeout
441-
)
442-
prop_builder_arg = prop_builder(
443-
interface_name, spec.findall("./property"), default_timeout
440+
interface_name, spec.findall("./method"), timeout
444441
)
442+
prop_builder_arg = prop_builder(interface_name, spec.findall("./property"), timeout)
445443

446444
def builder(namespace: MutableMapping[str, Type]) -> None:
447445
"""

0 commit comments

Comments
 (0)