From 6d447729251870baab41660ef76b2d1b2368e9cd Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 12 Jul 2018 14:03:46 +0530 Subject: [PATCH] mypy: Add a first stub file, for yamole. The main purpose of this commit is to demonstrate end-to-end that our setup for type stubs works. I picked this library more or less arbitrarily as one where the API surface we use is tiny, so that the stub would be extra easy to write. --- mypy.ini | 3 --- stubs/yamole.pyi | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 stubs/yamole.pyi diff --git a/mypy.ini b/mypy.ini index f069fd28bc..28d23c9f8d 100644 --- a/mypy.ini +++ b/mypy.ini @@ -261,9 +261,6 @@ ignore_missing_imports = True [mypy-two_factor,two_factor.*] ignore_missing_imports = True -[mypy-yamole] -ignore_missing_imports = True - diff --git a/stubs/yamole.pyi b/stubs/yamole.pyi new file mode 100644 index 0000000000..4e06360d67 --- /dev/null +++ b/stubs/yamole.pyi @@ -0,0 +1,7 @@ +from typing import Any, TextIO + +class YamoleParser: + data: Any # A blob of data parsed from YAML. + + def __init__(self, file: TextIO) -> None: + ...