Use direct assingment for settings#133
Merged
Merged
Conversation
brianhelba
reviewed
Jun 17, 2026
| @@ -99,7 +99,7 @@ def test_run_phold_simulation_success( | |||
| self, mock_call_command: mock.Mock, settings: object | |||
Collaborator
There was a problem hiding this comment.
The problem here is the type annotation on settings. It shouldn't be object.
I think it's fine to leave it as unannotated, which shouldn't cause any errors (please let me know if it does).
The actual type is SettingsWrapper, coming from from pytest_django.fixtures import SettingsWrapper.
brianhelba
reviewed
Jun 17, 2026
| self, mock_call_command: mock.Mock, settings: object | ||
| ) -> None: | ||
| """Test successful PHOLD simulation execution.""" | ||
| setattr(settings, "PHOLD_BINARY_PATH", "/path/to/phold") # noqa: B010 |
Collaborator
There was a problem hiding this comment.
In general, if we're writing worse, more-confusing code just to get around some sort of QA tool, then I'm fine to declare that the tool is probably wrong. I'd always appreciate hearing immediate feedback about these sort of cases, so we can investigate and make our tools more ergonomic.
bnmajor
force-pushed
the
fix-simulation-tests
branch
from
July 6, 2026 14:12
5220653 to
22383d8
Compare
marySalvi
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.