Skip to content

Commit

Permalink
Fix further typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hackermd committed Sep 23, 2020
1 parent 1aef511 commit eb24ea2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dicomweb_client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def _decode_multipart_message(
if stream:
iterator = response.iter_content(chunk_size=self._chunk_size)
else:
iterator = [response.content]
iterator = iter([response.content])
for i, chunk in enumerate(iterator):
if stream:
logger.debug(f'decode message content chunk #{i}')
Expand Down Expand Up @@ -965,8 +965,8 @@ def _build_multipart_accept_header_field_value(
]
if expected_media_type != media_type:
have_same_type = (
self._parse_media_type(media_type)[0] ==
self._parse_media_type(expected_media_type)[0]
cls._parse_media_type(media_type)[0] ==
cls._parse_media_type(expected_media_type)[0]
)
if (have_same_type and
(media_type.endswith('/*') or
Expand Down Expand Up @@ -1712,6 +1712,7 @@ def _get_common_media_type(
return common_media_types[0]

def _get_bulkdata(
self,
url: str,
media_types: Optional[Tuple[Union[str, Tuple[str, str]]]] = None,
byte_range: Optional[Tuple[int, int]] = None,
Expand Down Expand Up @@ -2715,7 +2716,7 @@ def _get_instance_frames(
)
else:
raise ValueError(
f'Media type "{common_media_types}" is not supported for '
f'Media type "{common_media_type}" is not supported for '
'retrieval of frames.'
)

Expand Down

0 comments on commit eb24ea2

Please sign in to comment.