This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> mypy --show-traceback tests/str_int.py | |
final def (a: builtins.str) -> builtins.int | |
final <class 'mypy.nodes.FuncDef'> | |
final def (a: builtins.str) -> builtins.int | |
final <class 'mypy.nodes.FuncDef'> | |
tests/str_int.py:2: error: Incompatible return value type (got "int", expected "str") [return-value] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pathlib | |
import click | |
import io, os | |
from enum import Enum | |
from typing import Optional, Union | |
import mypy.nodes | |
from mypy.parse import parse | |
from mypy.options import Options | |
from mypy.errors import CompileError, Errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* table *) | |
type 'a header = (string * 'a) list | |
type 'a header = string list | |
class ['a] table (header : 'b header) = object | |
val mutable header : 'b header = header | |
val mutable columns : 'a list = [] | |
method columns : 'a list = columns | |
(* add rows, can't enforce the header *) |