Skip to content

Incorrect type annotation for messages_to_table(): marked to take an Iterable[M] but requires len() #81

@alkasm

Description

@alkasm

Iterables can be infinite/don't necessary have a length, so this line of code invalidates the annotation. Length requires Sized. Could also use Collection[M] or Sequence[M] though those are a tad less generic.

collections.abc.Collection

ABC for sized iterable container classes.

Or, maybe the length can be circumvented.

Either way, was surprised to get a runtime error here - is this project type-checked in CI?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions