Skip to content

Invalid definition of Tuple in return reports on a confusing line number #3177

Closed
@daveisfera

Description

@daveisfera

Here's an example:

class TestTuple:
    @staticmethod
    def test(a: str) -> (bool, str):
        return len(a) < 2, a[:2]

And here's the output (I'd expect it to say Line #3):

test_invalid_tuple.py:2: error: Invalid tuple literal type

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions