Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 274417a4 authored by Martin Geisler's avatar Martin Geisler Committed by Cherrypicker Worker
Browse files

pdl: Fix docstring which promises too much

Test: n/a
(cherry picked from https://android-review.googlesource.com/q/commit:8e96445a5712a1c6944eafbc0defff276cccb538)
Merged-In: I79c35434a9a2de7519c8d7cf5e824d7f165a5613
Change-Id: I79c35434a9a2de7519c8d7cf5e824d7f165a5613
parent 42faa2b6
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -128,7 +128,8 @@ def get_packet_ancestor(
        return get_packet_ancestor(decl.file.packet_scope[decl.parent_id])


def get_derived_packets(decl: Union[PacketDeclaration, StructDeclaration]
def get_derived_packets(
    decl: Union[PacketDeclaration, StructDeclaration]
) -> List[Tuple[List[Constraint], Union[PacketDeclaration, StructDeclaration]]]:
    """Return the list of packets or structs that immediately derive from the
    selected packet or struct, coupled with the field constraints.
@@ -269,7 +270,7 @@ def get_field_offset_from_end(field: Field) -> Optional[int]:
def is_bit_field(field: Field) -> bool:
    """Identify fields that can have bit granularity.
    These include: ScalarField, FixedField, TypedefField with enum type,
    SizeField, and CountField. Returns the size of the field in bits."""
    SizeField, and CountField."""

    if isinstance(field, (ScalarField, SizeField, CountField, FixedField, ReservedField)):
        return True