Skip to content

Incorrect Tuple typing #55

@philer-jambit

Description

@philer-jambit

The get_word function has a count as its first parameter with the type int | Tuple[int]. However, since tuples have a fixed length, unlike for List, in the Tuple type multiple possible entries need their own types. Since the tuple version of the parameter takes two parameters (min and max), that type should be Tuple[int, int].

For example replace

def get_word(count: typing.Union[int, typing.Tuple[int]] = 1,

with

def get_word(count: typing.Union[int, typing.Tuple[int, int]] = 1,

There are more instances of this, such as the comma parameter in get_sentence. These are also mentioned in the README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions