From 2bcad38fbd1fb4022e2dc261817b9918cfbda43e Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 4 Jul 2020 12:30:40 +0300 Subject: [PATCH] Publish our types --- changelog/3342.feature.rst | 10 ++++++++++ setup.cfg | 4 ++++ src/_pytest/py.typed | 0 src/pytest/py.typed | 0 4 files changed, 14 insertions(+) create mode 100644 changelog/3342.feature.rst create mode 100644 src/_pytest/py.typed create mode 100644 src/pytest/py.typed diff --git a/changelog/3342.feature.rst b/changelog/3342.feature.rst new file mode 100644 index 000000000..aef7e2b04 --- /dev/null +++ b/changelog/3342.feature.rst @@ -0,0 +1,10 @@ +pytest now includes inline type annotations and exposes them to user programs. +Most of the user-facing API is covered, as well as internal code. + +If you are running a type checker such as mypy on your tests, you may start +noticing type errors indicating incorrect usage. If you run into an error that +you believe to be incorrect, please let us know in an issue. + +The types were developed against mypy version 0.780. Older versions may work, +but we recommend using at least this version. Other type checkers may work as +well, but they are not officially verified to work by pytest yet. diff --git a/setup.cfg b/setup.cfg index 3e5cfa1f8..31123f28e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -75,6 +75,10 @@ testing = requests xmlschema +[options.package_data] +_pytest = py.typed +pytest = py.typed + [build_sphinx] source-dir = doc/en/ build-dir = doc/build diff --git a/src/_pytest/py.typed b/src/_pytest/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/src/pytest/py.typed b/src/pytest/py.typed new file mode 100644 index 000000000..e69de29bb