mirror of https://github.com/streamlink/streamlink
tools: add mypy config
- Add mypy and available typing stubs to dev-requirements - Add mypy config - Add py.typed to streamlink + streamlink_cli packages (PEP 561): This is required, so that mypy can import types from streamlink when installed in editable mode. Don't publish this file for now. Once various streamlink APIs are properly typed, typing stub files can be added instead.
This commit is contained in:
parent
8fc178276e
commit
334e18e412
|
@ -45,6 +45,7 @@ local/
|
||||||
share/
|
share/
|
||||||
pip-selfcheck.json
|
pip-selfcheck.json
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
# ignore any key files
|
# ignore any key files
|
||||||
*.key
|
*.key
|
||||||
|
|
|
@ -8,3 +8,9 @@ flake8
|
||||||
flake8-import-order
|
flake8-import-order
|
||||||
shtab
|
shtab
|
||||||
versioningit >=1.1.1, <2
|
versioningit >=1.1.1, <2
|
||||||
|
|
||||||
|
mypy
|
||||||
|
lxml-stubs
|
||||||
|
types-freezegun
|
||||||
|
types-requests
|
||||||
|
types-urllib3
|
||||||
|
|
|
@ -46,3 +46,12 @@ exclude_lines = [
|
||||||
"raise NotImplementedError",
|
"raise NotImplementedError",
|
||||||
"if __name__ == \"__main__\":",
|
"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
|
||||||
|
|
Loading…
Reference in New Issue