Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimarius committed Aug 7, 2024
1 parent 29647aa commit e61f529
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imapy/imap.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def email(self, sequence_number: int) -> Optional[EmailMessage]:
return None

@is_logged
def emails(self, *args, **kwargs) -> Union[List[EmailMessage], List[str]]:
def emails(self, *args, **kwargs) -> List[Union[EmailMessage, str]]:
"""Returns emails based on search criteria or sequence set"""
ids_only: bool = kwargs.get("ids_only", False)
if len(args) > 2:
Expand Down Expand Up @@ -359,7 +359,7 @@ def _get_emails_by_sequence(
from_id: Optional[int] = None,
to_id: Optional[int] = None,
ids_only: bool = False,
) -> Union[List[EmailMessage], List[str]]:
) -> List[Union[EmailMessage, str]]:
"""Returns emails fetched by their sequence numbers."""
from_seq = from_id
to_seq = to_id
Expand Down

0 comments on commit e61f529

Please sign in to comment.