Skip to content

Commit a4453a6

Browse files
wieso-itzibamthomas
authored andcommitted
replace incorrect 'Pattern' typehint with 'str'
1 parent 83128c8 commit a4453a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aioimaplib/aioimaplib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from copy import copy
2929
from datetime import datetime, timezone, timedelta
3030
from enum import Enum
31-
from typing import Union, Any, Coroutine, Callable, Optional, Pattern, List
31+
from typing import Union, Any, Coroutine, Callable, Optional, List
3232

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

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

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

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

0 commit comments

Comments
 (0)