-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
99 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,8 @@ | ||
[metadata] | ||
license_files = LICENSE, LICENSE.dual, LICENSE.lesser | ||
|
||
[build_sphinx] | ||
source-dir = docs/source | ||
build-dir = docs/build | ||
all_files = 1 | ||
|
||
[upload_sphinx] | ||
upload-dir = docs/build/html | ||
|
||
[flake8] | ||
max-line-length = 99 | ||
ignore = W503, W605 | ||
extend-ignore = E203 | ||
exclude = setup.py, setup-raw.py docs/source/conf.py | ||
|
||
[pylint.message-control] | ||
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, | ||
too-many-statements, cyclic-import | ||
enable=useless-suppression ; Warns about unused pylint ignores | ||
exclude-protected=_unfrozen | ||
|
||
[tool:pytest] | ||
testpaths = tests | ||
addopts = --no-success-flaky-report -rsxX | ||
filterwarnings = | ||
error | ||
ignore::DeprecationWarning | ||
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 | ||
|
||
; 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 | ||
markers = | ||
dev: If you want to test a specific test, use this | ||
no_req | ||
req | ||
asyncio_mode = auto | ||
|
||
[coverage:run] | ||
branch = True | ||
source = telegram | ||
parallel = True | ||
concurrency = thread, multiprocessing | ||
omit = | ||
tests/ | ||
telegram/__main__.py | ||
|
||
[coverage:report] | ||
exclude_lines = | ||
pragma: no cover | ||
@overload | ||
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 | ||
python_version = 3.8 | ||
|
||
# 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] | ||
strict_optional = False | ||
|
||
# type hinting for asyncio in webhookhandler is a bit tricky because it depends on the OS | ||
[mypy-telegram.ext._utils.webhookhandler] | ||
warn_unused_ignores = False | ||
|
||
[mypy-apscheduler.*] | ||
ignore_missing_imports = True | ||
|
||
# The libs listed below are only used for the `customwebhookbot_*.py` examples | ||
# let's just ignore type checking for them for now | ||
[mypy-uvicorn.*] | ||
ignore_missing_imports = True | ||
[mypy-starlette.*] | ||
ignore_missing_imports = True | ||
[mypy-asgiref.*] | ||
ignore_missing_imports = True | ||
[mypy-flask.*] | ||
ignore_missing_imports = True | ||
[mypy-quart.*] | ||
ignore_missing_imports = True | ||
[mypy-django.*] | ||
ignore_missing_imports = True |