From 91d8f3c5ecc2f2670e7d8cb2705279b6f789fb31 Mon Sep 17 00:00:00 2001 From: DeborahVolpe Date: Thu, 29 Aug 2024 13:36:22 +0200 Subject: [PATCH] update configuration for precommit --- pyproject.toml | 1 - scripts/Knapsack/Knapsack.py | 2 +- scripts/linear_regression/LinearRegression.py | 6 +++--- tests/test_evaluation.py | 9 +++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 14e4fc4..822be86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,7 +140,6 @@ ignore_missing_imports = true [tool.ruff] line-length = 120 -src = ["src"] preview = true unsafe-fixes = true diff --git a/scripts/Knapsack/Knapsack.py b/scripts/Knapsack/Knapsack.py index 0022078..78b7dd4 100644 --- a/scripts/Knapsack/Knapsack.py +++ b/scripts/Knapsack/Knapsack.py @@ -6,10 +6,10 @@ from typing import cast import numpy as np +from sympy import Expr # for managing symbols from mqt.qao import Constraints, ObjectiveFunction, Problem, Solver, Variables -from sympy import Expr lambdas_method = [ "upper_bound_only_positive", diff --git a/scripts/linear_regression/LinearRegression.py b/scripts/linear_regression/LinearRegression.py index 0725bf6..724e03e 100644 --- a/scripts/linear_regression/LinearRegression.py +++ b/scripts/linear_regression/LinearRegression.py @@ -4,13 +4,13 @@ import numpy as np import pandas as pd - -# for managing symbols -from mqt.qao import Constraints, ObjectiveFunction, Problem, Solver, Variables from sklearn.decomposition import PCA from sklearn.utils import shuffle from sympy import Expr +# for managing symbols +from mqt.qao import Constraints, ObjectiveFunction, Problem, Solver, Variables + df = pd.read_csv("iris_csv.csv") df = shuffle(df) d = len(df.columns) - 1 diff --git a/tests/test_evaluation.py b/tests/test_evaluation.py index e4b89af..ccc809b 100644 --- a/tests/test_evaluation.py +++ b/tests/test_evaluation.py @@ -7,16 +7,17 @@ import numpy as np import pytest + +# for managing symbols +from qubovert import PUBO, boolean_var +from sympy import Expr + from mqt.qao.constraints import Constraints from mqt.qao.objectivefunction import ObjectiveFunction from mqt.qao.problem import Problem from mqt.qao.solvers import Solution, Solver from mqt.qao.variables import Variables -# for managing symbols -from qubovert import PUBO, boolean_var -from sympy import Expr - def test_binary_only() -> None: """Test only the construction of binary variables"""