diff --git a/.gitignore b/.gitignore index 8d5f48eb..6f34d489 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ local/ share/ pip-selfcheck.json .pytest_cache/ +.mypy_cache/ # ignore any key files *.key diff --git a/dev-requirements.txt b/dev-requirements.txt index d0359016..6b1c7d53 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -8,3 +8,9 @@ flake8 flake8-import-order shtab versioningit >=1.1.1, <2 + +mypy +lxml-stubs +types-freezegun +types-requests +types-urllib3 diff --git a/pyproject.toml b/pyproject.toml index 697065d6..9901699c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,3 +46,12 @@ exclude_lines = [ "raise NotImplementedError", "if __name__ == \"__main__\":", ] + + +# https://mypy.readthedocs.io/en/stable/config_file.html +[tool.mypy] +python_version = 3.7 +show_error_codes = true +show_error_context = true +show_column_numbers = true +warn_no_return = false diff --git a/src/streamlink/py.typed b/src/streamlink/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/src/streamlink_cli/py.typed b/src/streamlink_cli/py.typed new file mode 100644 index 00000000..e69de29b