Skip to content

Interest In Type Annotations #31

@dosisod

Description

@dosisod

Hi! I was wondering if there was any interest in adding type annotations to this library.

I saw on README that python2 is still supported, so this eliminates the option of having inline type annotations. As an alternative, we could have use type comments:

# add.py

def add(a, b):
    # type (int, int) -> int
    return a + b

Or make seperate .pyi type stub files:

# add.pyi

def add(a: int, b: int) -> int: ...

These files could be stored in this repository, or stored in typeshed. which allows type checkers access to type stubs for lots of standard and 3rd party libraries.

Let me know what you guys think! I dont mind putting in the effort, just thought I might ask before I get anything started.

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