Skip to content

Commit

Permalink
Fix broken unit tests and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
icgood committed Jul 27, 2020
1 parent a8a2e51 commit 6ee6a67
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pymap/mime/parsed.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ def _parse(cls, values: Sequence[Sequence[bytes]]) \
for value in values:
lines = [line.decode('ascii', 'surrogateescape')
for line in value]
hdr_name, hdr_val = SMTP.header_source_parse(lines)
yield cls._registry(hdr_name, hdr_val)
# TODO: Once typeshed merges this fix:
# https://github.com/python/typeshed/pull/4365
# assign to hdr_name, hdr_value = ... instead.
hdr_tuple = SMTP.header_source_parse(lines)
yield cls._registry(hdr_tuple[0], hdr_tuple[1])

def __repr__(self) -> str:
return repr(dict(self))
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
'redis': ['aioredis >= 1.3.0', 'msgpack >= 1.0'],
'admin': ['pymap-admin == 0.4.2'],
'sieve': ['sievelib'],
'optional': ['hiredis', 'passlib', 'systemd-python', 'pid']},
'systemd': ['systemd-python'],
'optional': ['hiredis', 'passlib', 'pid']},
entry_points={
'console_scripts': [
'pymap = pymap.main:main'],
Expand Down
1 change: 1 addition & 0 deletions test/server/mocktransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class _Socket:

def __init__(self, fd: int) -> None:
self.fd = fd
self.family = None

def fileno(self):
return self.fd
Expand Down

0 comments on commit 6ee6a67

Please sign in to comment.