diff --git a/.github/workflows/ci-rust-python-package.yaml b/.github/workflows/ci-rust-python-package.yaml index a4f9090..7d57720 100644 --- a/.github/workflows/ci-rust-python-package.yaml +++ b/.github/workflows/ci-rust-python-package.yaml @@ -232,8 +232,7 @@ jobs: - name: Create mutation diff env: BASE_SHA: ${{ github.event.pull_request.base.sha }} - HEAD_SHA: ${{ github.event.pull_request.head.sha }} - run: git diff "${BASE_SHA}..${HEAD_SHA}" -- '*.rs' > cargo-mutants.diff + run: git diff "${BASE_SHA}" -- '*.rs' > cargo-mutants.diff - name: Run cargo-mutants with nextest env: diff --git a/plugins/rust/python-package/secrets_detection/src/object_model.rs b/plugins/rust/python-package/secrets_detection/src/object_model.rs index ac336d8..2d3b2a3 100644 --- a/plugins/rust/python-package/secrets_detection/src/object_model.rs +++ b/plugins/rust/python-package/secrets_detection/src/object_model.rs @@ -14,7 +14,7 @@ pub fn inspect_object_state<'py>( py: Python<'py>, container: &Bound<'py, PyAny>, ) -> PyResult> { - inspect_object_state_inner(py, container, true) + inspect_object_state_inner(py, container, include_model_dump_by_default()) } pub(crate) fn inspect_object_state_without_model_dump<'py>( @@ -24,6 +24,10 @@ pub(crate) fn inspect_object_state_without_model_dump<'py>( inspect_object_state_inner(py, container, false) } +fn include_model_dump_by_default() -> bool { + true +} + fn inspect_object_state_inner<'py>( py: Python<'py>, container: &Bound<'py, PyAny>, diff --git a/tests/test_plugin_catalog.py b/tests/test_plugin_catalog.py index 8070af5..9b1a56d 100644 --- a/tests/test_plugin_catalog.py +++ b/tests/test_plugin_catalog.py @@ -2652,9 +2652,9 @@ def test_ci_workflow_includes_parity_jobs_for_rust_plugin_checks(self) -> None: self.assertIn("cargo install cargo-mutants --version 27.0.0 --locked", mutants_install_run) self.assertIn("cargo mutants --version", mutants_install_run) self.assertIn("fetch-depth: 0", mutants_section) - self.assertEqual('git diff "${BASE_SHA}..${HEAD_SHA}" -- \'*.rs\' > cargo-mutants.diff\n', mutants_diff_run) + self.assertEqual('git diff "${BASE_SHA}" -- \'*.rs\' > cargo-mutants.diff\n', mutants_diff_run) self.assertIn("BASE_SHA: ${{ github.event.pull_request.base.sha }}", mutants_section) - self.assertIn("HEAD_SHA: ${{ github.event.pull_request.head.sha }}", mutants_section) + self.assertNotIn("HEAD_SHA:", mutants_section) self.assertIn("mutation_job: ${{ fromJson(needs.validate-and-detect.outputs.mutation_jobs) }}", mutants_section) self.assertIn("CARGO_PACKAGE: ${{ matrix.mutation_job.cargo_package }}", mutants_section) self.assertIn("IN_DIFF: ${{ matrix.mutation_job.in_diff }}", mutants_section)