Skip to content

Is there a description of the mypy type checking algorithms? #1994

Closed
@nguyenthanhvuh

Description

@nguyenthanhvuh

Hi, I am just trying out mypy and have the following code in a file t.py:

def f1(x:int) -> int:                                                                           
    if x > 0:
        return 1

Running mypy t.py --strict-optional gives no error or warning. Am I missing something ?

Also, are there some technical documentations for mypy, e.g., what type inference and checking algorithms were used ? I saw some code about solving constraints in mypy, but I am more interested in a technical document.

Thanks,

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