Skip to content

Potential fix for code scanning alert no. 292: Missing call to superclass __init__ during object initialization - #504

Draft
DavidPCoster wants to merge 1 commit into
devfrom
alert-autofix-292
Draft

Potential fix for code scanning alert no. 292: Missing call to superclass __init__ during object initialization#504
DavidPCoster wants to merge 1 commit into
devfrom
alert-autofix-292

Conversation

@DavidPCoster

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/UCL-CCS/EasyVVUQ/security/code-scanning/292

General fix: in subclass constructors, call the parent initializer (super().__init__(...)) before subclass-specific field setup, unless there is a deliberate and documented reason not to.

Best fix here (without changing functionality): update MCMCAnalysisResults.__init__ in src/easyvvuq/analysis/mcmc.py to call super().__init__() and then keep existing self.chains = chains. No new imports or additional methods are needed.

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

…lass `__init__` during object initialization

Not sure if this is really necessary ...

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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