mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
python: add mypy support and some type hints
`deltachat.const` module now defines `__getattr__` and `__dir__` as suggested by https://www.python.org/dev/peps/pep-0562/ mypy detects that `__getattr__` is defined and does not show errors for `DC_*` constants which cannot be detected statically. mypy is added to `tox.ini`, so type check can be run with `tox -e mypy`.
This commit is contained in:
@@ -14,7 +14,7 @@ class Provider(object):
|
||||
:param domain: The email to get the provider info for.
|
||||
"""
|
||||
|
||||
def __init__(self, account, addr):
|
||||
def __init__(self, account, addr) -> None:
|
||||
provider = ffi.gc(
|
||||
lib.dc_provider_new_from_email(account._dc_context, as_dc_charpointer(addr)),
|
||||
lib.dc_provider_unref,
|
||||
|
||||
Reference in New Issue
Block a user