Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .envrc

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions src/minizinc/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading