Skip to content

Improve definitions for unicodedata #982

@rr-

Description

@rr-
rr-@tornado:~$ cat test.py
import unicodedata
print(unicodedata.category('A'))
rr-@tornado:~$ mypy test.py --disallow-untyped-calls
test.py:2: error: Call to untyped function "category" in typed context

I think this happens because https://github.com/python/typeshed/blob/master/stdlib/3/unicodedata.pyi is too lax about returned types.

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