2018-08-29 15:39:44 +02:00
|
|
|
[metadata]
|
2022-11-15 17:47:24 +01:00
|
|
|
license_files = LICENSE, LICENSE.dual, LICENSE.lesser
|
2018-08-29 15:39:44 +02:00
|
|
|
|
2015-08-14 21:30:30 +02:00
|
|
|
[build_sphinx]
|
|
|
|
source-dir = docs/source
|
|
|
|
build-dir = docs/build
|
|
|
|
all_files = 1
|
|
|
|
|
|
|
|
[upload_sphinx]
|
2015-08-11 21:49:38 +02:00
|
|
|
upload-dir = docs/build/html
|
2016-04-28 15:03:43 +02:00
|
|
|
|
|
|
|
[flake8]
|
|
|
|
max-line-length = 99
|
2019-10-14 10:10:51 +02:00
|
|
|
ignore = W503, W605
|
2020-10-09 17:22:07 +02:00
|
|
|
extend-ignore = E203
|
2022-04-24 12:38:09 +02:00
|
|
|
exclude = setup.py, setup-raw.py docs/source/conf.py
|
2020-10-31 16:33:34 +01:00
|
|
|
|
|
|
|
[pylint.message-control]
|
2022-04-24 12:38:09 +02:00
|
|
|
disable = duplicate-code,too-many-arguments,too-many-public-methods,too-few-public-methods,
|
|
|
|
broad-except,too-many-instance-attributes,fixme,missing-function-docstring,
|
|
|
|
missing-class-docstring,too-many-locals,too-many-lines,too-many-branches,
|
2022-05-05 09:27:54 +02:00
|
|
|
too-many-statements
|
|
|
|
enable=useless-suppression ; Warns about unused pylint ignores
|
2022-12-15 15:00:36 +01:00
|
|
|
exclude-protected=_unfrozen
|
2016-05-15 02:52:35 +02:00
|
|
|
|
2017-08-11 23:58:41 +02:00
|
|
|
[tool:pytest]
|
|
|
|
testpaths = tests
|
|
|
|
addopts = --no-success-flaky-report -rsxX
|
|
|
|
filterwarnings =
|
|
|
|
error
|
|
|
|
ignore::DeprecationWarning
|
2022-04-24 12:38:09 +02:00
|
|
|
ignore:Tasks created via `Application\.create_task` while the application is not running
|
|
|
|
ignore::ResourceWarning
|
|
|
|
; TODO: Write so good code that we don't need to ignore ResourceWarnings anymore
|
|
|
|
|
2021-02-13 22:07:37 +01:00
|
|
|
; Unfortunately due to https://github.com/pytest-dev/pytest/issues/8343 we can't have this here
|
|
|
|
; and instead do a trick directly in tests/conftest.py
|
|
|
|
; ignore::telegram.utils.deprecate.TelegramDeprecationWarning
|
2023-02-11 10:45:17 +01:00
|
|
|
markers =
|
|
|
|
dev: If you want to test a specific test, use this
|
|
|
|
no_req
|
|
|
|
req
|
2022-05-05 09:27:54 +02:00
|
|
|
asyncio_mode = auto
|
2017-08-11 23:58:41 +02:00
|
|
|
|
|
|
|
[coverage:run]
|
2017-09-01 08:44:45 +02:00
|
|
|
branch = True
|
2017-08-11 23:58:41 +02:00
|
|
|
source = telegram
|
2017-09-01 08:44:45 +02:00
|
|
|
parallel = True
|
|
|
|
concurrency = thread, multiprocessing
|
2017-08-11 23:58:41 +02:00
|
|
|
omit =
|
|
|
|
tests/
|
|
|
|
telegram/__main__.py
|
|
|
|
|
2020-10-06 19:28:40 +02:00
|
|
|
[coverage:report]
|
|
|
|
exclude_lines =
|
2021-06-25 09:02:46 +02:00
|
|
|
pragma: no cover
|
|
|
|
@overload
|
2020-10-06 19:28:40 +02:00
|
|
|
if TYPE_CHECKING:
|
|
|
|
|
|
|
|
[mypy]
|
|
|
|
warn_unused_ignores = True
|
|
|
|
warn_unused_configs = True
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
disallow_incomplete_defs = True
|
|
|
|
disallow_untyped_decorators = True
|
|
|
|
show_error_codes = True
|
|
|
|
|
2021-11-21 12:39:04 +01:00
|
|
|
# For some files, it's easier to just disable strict-optional all together instead of
|
|
|
|
# cluttering the code with `# type: ignore`s or stuff like
|
|
|
|
# `if self.text is None: raise RuntimeError()`
|
|
|
|
[mypy-telegram._callbackquery,telegram._file,telegram._message,telegram._files.file]
|
2020-10-06 19:28:40 +02:00
|
|
|
strict_optional = False
|
2020-10-31 16:33:34 +01:00
|
|
|
|
2021-03-13 16:21:03 +01:00
|
|
|
# type hinting for asyncio in webhookhandler is a bit tricky because it depends on the OS
|
2021-10-10 15:10:21 +02:00
|
|
|
[mypy-telegram.ext._utils.webhookhandler]
|
2021-03-13 16:21:03 +01:00
|
|
|
warn_unused_ignores = False
|
|
|
|
|
2020-10-31 16:33:34 +01:00
|
|
|
[mypy-apscheduler.*]
|
|
|
|
ignore_missing_imports = True
|
2022-06-03 16:55:36 +02:00
|
|
|
|
2023-08-16 21:15:32 +02:00
|
|
|
# The libs listed below are only used for the `customwebhookbot_*.py` examples
|
2022-06-03 16:55:36 +02:00
|
|
|
# let's just ignore type checking for them for now
|
|
|
|
[mypy-uvicorn.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-starlette.*]
|
|
|
|
ignore_missing_imports = True
|
2023-08-16 21:15:32 +02:00
|
|
|
[mypy-asgiref.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-flask.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-quart.*]
|
|
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-django.*]
|
|
|
|
ignore_missing_imports = True
|