Skip to content
#

typechecker

Here are 61 public repositories matching this topic...

JukkaL
JukkaL commented Nov 21, 2019

Some users don't understand why mypy complains about incompatible overrides. We could add an extra note in cases where the argument type is narrower in an override or the return type is wider (or all incompatible overrides). The note could mention Liskov substitution principle and add a link to mypy documentation (add a new section to https://mypy.readthedocs.io/en/latest/common_issues.html perhap

SKalt
SKalt commented Oct 28, 2018

Issue Scope

  1. provide an example in the guided tour on following imports in a virtualenv
  2. clarify CLI argument documentation to show how to pass multiple directories to --search-path

The Story

I wanted to write an example of checking pip-installed imports using pyre. After reading through the documentation, I found that vanilla `source activate my-venv; pyre --source-directory

zero323
zero323 commented Sep 12, 2019

Example annotation:

from typing import overload

@overload
def f(x: str) -> str: ...
@overload
def f(x: int) -> int: ...

and source file

def f(x):
    if isinstance(x, (str, int)):
        return x
    else:
        raise TypeError(f"x should be str or int, got {type(x)}")

Call

merge-pyi foo.py foo.pyi

Actual output

bug

Improve this page

Add a description, image, and links to the typechecker topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the typechecker topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.