diff --git a/pyproject.toml b/pyproject.toml index a1fe3c508..711dada7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -136,6 +136,9 @@ ignore = [ "D", "S101", # Use of assert ] +"tests/test_mlflow.py" = [ + "E402", # Module level import not at top of file. Needed for importorskip +] "scripts/*" = ["D"] [tool.ruff.lint.pycodestyle] diff --git a/tests/test_mlflow.py b/tests/test_mlflow.py index 8e7d1a25b..7d5028b8d 100644 --- a/tests/test_mlflow.py +++ b/tests/test_mlflow.py @@ -11,13 +11,16 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import pytest + +mlflow = pytest.importorskip("mlflow") + import json import logging from collections import namedtuple from pathlib import Path import arviz as az -import mlflow import numpy as np import pandas as pd import pymc as pm