mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
python: type annotations for testplugin.py
This commit is contained in:
@@ -6,7 +6,7 @@ from array import array
|
||||
from contextlib import contextmanager
|
||||
from email.utils import parseaddr
|
||||
from threading import Event
|
||||
from typing import Any, Dict, Generator, List, Optional, Union
|
||||
from typing import Any, Dict, Generator, List, Optional, Union, TYPE_CHECKING
|
||||
|
||||
from . import const, hookspec
|
||||
from .capi import ffi, lib
|
||||
@@ -22,6 +22,9 @@ from .cutil import (
|
||||
from .message import Message
|
||||
from .tracker import ConfigureTracker, ImexTracker
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .events import FFIEventTracker
|
||||
|
||||
|
||||
class MissingCredentials(ValueError):
|
||||
"""Account is missing `addr` and `mail_pw` config values."""
|
||||
@@ -60,6 +63,9 @@ class Account:
|
||||
|
||||
MissingCredentials = MissingCredentials
|
||||
|
||||
_logid: str
|
||||
_evtracker: "FFIEventTracker"
|
||||
|
||||
def __init__(self, db_path, os_name=None, logging=True, closed=False) -> None:
|
||||
from .events import EventThread
|
||||
|
||||
|
||||
Reference in New Issue
Block a user