diff --git a/client/securedrop_client/crypto.py b/client/securedrop_client/crypto.py index abbadd082..a4f7f66c2 100644 --- a/client/securedrop_client/crypto.py +++ b/client/securedrop_client/crypto.py @@ -100,7 +100,7 @@ def decrypt_submission_or_reply( """ original_filename = Path(Path(filepath).stem).stem # Remove one or two suffixes - err = tempfile.NamedTemporaryFile(suffix=".message-error", delete=False) + err = tempfile.NamedTemporaryFile(suffix=".message-error", delete=False) # noqa: SIM115 with tempfile.NamedTemporaryFile(suffix=".message") as out: cmd = self._gpg_cmd_base() cmd.extend(["--decrypt", filepath]) diff --git a/client/securedrop_client/gui/widgets.py b/client/securedrop_client/gui/widgets.py index a92955f4f..1ab4524c3 100644 --- a/client/securedrop_client/gui/widgets.py +++ b/client/securedrop_client/gui/widgets.py @@ -1237,9 +1237,9 @@ def update_sources(self, sources: list[Source]) -> list[str]: source_widget.reload() # Add widgets for new sources - for uuid in sources_to_add: + for uuid, source in sources_to_add.items(): source_widget = SourceWidget( - self.controller, sources_to_add[uuid], self.source_selected, self.adjust_preview + self.controller, source, self.source_selected, self.adjust_preview ) source_item = SourceListWidgetItem(self) source_item.setSizeHint(source_widget.sizeHint()) diff --git a/client/securedrop_client/sdk/__init__.py b/client/securedrop_client/sdk/__init__.py index 810e3d9a0..c0d9e3aed 100644 --- a/client/securedrop_client/sdk/__init__.py +++ b/client/securedrop_client/sdk/__init__.py @@ -133,7 +133,7 @@ def _rpc_target(self) -> list: def _streaming_download( self, data: dict[str, Any], env: dict ) -> StreamedResponse | JSONResponse: - fobj = tempfile.TemporaryFile("w+b") + fobj = tempfile.TemporaryFile("w+b") # noqa: SIM115 retry = 0 bytes_written = 0