Skip to content

Fix for Missing call to superclass __init__ during object initialization#9635

Merged
ThomasWaldmann merged 1 commit into
masterfrom
finding-autofix-03f334da
May 22, 2026
Merged

Fix for Missing call to superclass __init__ during object initialization#9635
ThomasWaldmann merged 1 commit into
masterfrom
finding-autofix-03f334da

Conversation

@ThomasWaldmann
Copy link
Copy Markdown
Member

To fix this, update TestDeriveKey.CustomKey.__init__ to call KeyBase.__init__ via super().__init__(None) before setting test-specific fields. This preserves existing test behavior while ensuring base initialization is not skipped.

In src/borg/testsuite/crypto/crypto_test.py, edit the nested CustomKey class around lines 284–288:

  • In __init__, add super().__init__(None) as the first statement.
  • Keep assignments to self.crypt_key and self.id_key unchanged so test semantics remain identical.

No new imports, methods, or external dependencies are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

@ThomasWaldmann ThomasWaldmann force-pushed the finding-autofix-03f334da branch from aec559f to 49e6b65 Compare May 13, 2026 21:39
…ation

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ThomasWaldmann ThomasWaldmann force-pushed the finding-autofix-03f334da branch from 49e6b65 to 9d6a64e Compare May 22, 2026 09:46
@ThomasWaldmann ThomasWaldmann marked this pull request as ready for review May 22, 2026 10:24
@ThomasWaldmann ThomasWaldmann merged commit 1dd5840 into master May 22, 2026
20 checks passed
@ThomasWaldmann ThomasWaldmann deleted the finding-autofix-03f334da branch May 22, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant