diff --git a/.codacy.yaml b/.codacy.yaml index d3c4016e..15cf578e 100644 --- a/.codacy.yaml +++ b/.codacy.yaml @@ -1,3 +1,4 @@ --- exclude_paths: - tests/** + - scripts/** diff --git a/exchangelib/services/get_attachment.py b/exchangelib/services/get_attachment.py index e1fba440..53d35f4f 100644 --- a/exchangelib/services/get_attachment.py +++ b/exchangelib/services/get_attachment.py @@ -33,8 +33,7 @@ def _update_api_version(self, hint, api_version, header, **parse_opts): if not parse_opts.get('stream_file_content', False): return super(GetAttachment, self)._update_api_version(hint, api_version, header, **parse_opts) - # TODO: We're skipping this part because our streaming parser cannot parse the SOAP header - pass + # TODO: We're skipping this part in streaming mode because our streaming parser cannot parse the SOAP header @classmethod def _get_soap_parts(cls, response, **parse_opts): @@ -68,7 +67,7 @@ def stream_file_content(self, attachment_id): # Let the non-streaming SOAP parser parse the response and hook into the normal exception handling. # Wrap in DummyResponse because _get_soap_payload() expects an iter_content() method. response = DummyResponse(url=None, headers=None, request_headers=None, content=enf.data) - header, body = super(GetAttachment, self)._get_soap_parts(response=response) + _, body = super(GetAttachment, self)._get_soap_parts(response=response) res = super(GetAttachment, self)._get_soap_messages(body=body) for e in self._get_elements_in_response(response=res): if isinstance(e, Exception):