From 287e4d091b081ee14a1953ea06beb85946575bba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:48:13 +0000 Subject: [PATCH 1/2] Bump astral-sh/setup-uv from 4 to 5 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 5. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v4...v5) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/python-package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7dc01da..eb5e7ad 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -41,7 +41,7 @@ jobs: sudo chmod +x ${{ github.workspace }}/bin/minizinc minizinc --version - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -60,7 +60,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Set up Python uses: actions/setup-python@v5 with: @@ -79,7 +79,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: From 24866cd1208b5f91a0749574a026a45036f3583f Mon Sep 17 00:00:00 2001 From: "Jip J. Dekker" Date: Fri, 17 Jan 2025 09:39:41 +1100 Subject: [PATCH 2/2] Update formatting and remove unnecessary file --- .envrc | 1 - src/minizinc/instance.py | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 .envrc diff --git a/.envrc b/.envrc deleted file mode 100644 index 3550a30..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake diff --git a/src/minizinc/instance.py b/src/minizinc/instance.py index 54f1572..3cdca2f 100644 --- a/src/minizinc/instance.py +++ b/src/minizinc/instance.py @@ -342,9 +342,11 @@ async def diverse_solutions( with inst.branch() as child: # Add constraints to the model that sets the decision variables to the reference solution, if provided if reference_solution: - if isinstance(reference_solution, Result) and is_dataclass( - reference_solution.solution - ) and not isinstance(reference_solution.solution, type): + if ( + isinstance(reference_solution, Result) + and is_dataclass(reference_solution.solution) + and not isinstance(reference_solution.solution, type) + ): solution_obj = asdict(reference_solution.solution) else: assert isinstance(reference_solution, dict)