Skip to content

Mypy error on structure #111

@gleb-chipiga

Description

@gleb-chipiga
  • cattrs version: 1.1.2
  • Python version: 3.8.6
  • Operating System: Linux x86-64

Description

Run mypy on first example from readme and get error.

What I Did

import cattr
from typing import Tuple

cattr.structure([1.0, 2, "3"], Tuple[int, int, int])
$ mypy example.py
example.py:4: error: Argument 2 has incompatible type "object"; expected "Type[<nothing>]"
Found 1 error in 1 file (checked 1 source file)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions