Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aioimaplib/aioimaplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from copy import copy
from datetime import datetime, timezone, timedelta
from enum import Enum
from typing import Union, Any, Coroutine, Callable, Optional, Pattern, List
from typing import Union, Any, Coroutine, Callable, Optional, List

# to avoid imap servers to kill the connection after 30mn idling
# cf https://www.imapwiki.org/ClientImplementation/Synchronization
Expand Down Expand Up @@ -620,7 +620,7 @@ async def simple_command(self, name, *args: str) -> Response:
async def wait_async_pending_commands(self) -> None:
await asyncio.wait([asyncio.ensure_future(cmd.wait()) for cmd in self.pending_async_commands.values()])

async def wait(self, state_regexp: Pattern) -> None:
async def wait(self, state_regexp: str) -> None:
state_re = re.compile(state_regexp)
async with self.state_condition:
await self.state_condition.wait_for(lambda: state_re.match(self.state))
Expand Down Expand Up @@ -840,7 +840,7 @@ async def rename(self, old_mailbox_name: str, new_mailbox_name: str) -> Response
async def getquotaroot(self, mailbox_name: str) -> Response:
return await asyncio.wait_for(self.protocol.execute(Command('GETQUOTAROOT', self.protocol.new_tag(), 'INBOX', untagged_resp_name='QUOTA')), self.timeout)

async def list(self, reference_name: str, mailbox_pattern: Pattern) -> Response:
async def list(self, reference_name: str, mailbox_pattern: str) -> Response:
return await asyncio.wait_for(self.protocol.simple_command('LIST', reference_name, mailbox_pattern), self.timeout)

async def append(self, message_bytes, mailbox: str = 'INBOX', flags: str = None, date: Any = None) -> Response:
Expand Down