diff --git a/amlb/results.py b/amlb/results.py index 4ce41a1a9..4cef9498e 100644 --- a/amlb/results.py +++ b/amlb/results.py @@ -12,7 +12,7 @@ import os import re import statistics -from typing import Union +from typing import Union, cast import numpy as np from numpy import nan, sort @@ -297,7 +297,7 @@ def save_predictions(dataset: Dataset, output_file: str, if isinstance(predictions, S): predictions = predictions.values if scipy.sparse.issparse(truth) and truth.shape[1] == 1: - truth = pd.DataFrame(truth.todense()) + truth = pd.DataFrame(cast(scipy.sparse.sparray, truth).todense()) if isinstance(truth, DF): truth = truth.squeeze() if isinstance(truth, S): diff --git a/amlb/utils/config.py b/amlb/utils/config.py index 5bf80412e..56bdcb53a 100644 --- a/amlb/utils/config.py +++ b/amlb/utils/config.py @@ -42,7 +42,7 @@ def yaml_load(file, as_namespace=False): yaml = YAML(typ='safe') return yaml.load(file) else: - def yaml_load(*_, **__): + def yaml_load(*_, **__): # type: ignore[misc] raise ImportError("ruamel.yaml package is required to load `yaml` config files.") diff --git a/pyproject.toml b/pyproject.toml index a5d4d3d04..ff6479037 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,35 +18,6 @@ module=[ ] ignore_missing_imports=true -[[tool.mypy.overrides]] -ignore_errors = false -module = "amlb.utils.*" - - -[[tool.mypy.overrides]] -ignore_errors = false -module = "amlb.benchmarks.*" - - -[[tool.mypy.overrides]] -ignore_errors = false -module = "amlb.datasets.*" - - -[[tool.mypy.overrides]] -ignore_errors = false -module = "amlb.frameworks.*" - - -[[tool.mypy.overrides]] -ignore_errors = false -module = "amlb.runners.*" - - -[[tool.mypy.overrides]] -ignore_errors = false -module = "amlb.*" - [[tool.mypy.overrides]] module = "amlb.benchmark" disable_error_code = "union-attr"