From 0d49311612ff1ebdab0265276f4beffd16916d09 Mon Sep 17 00:00:00 2001
From: Kristina Thieme <krissithieme@gmx.de>
Date: Wed, 22 Nov 2023 13:12:22 +0100
Subject: [PATCH] tests should run trough now

---
 .pre-commit-config.yaml |  2 +-
 deepcave/__init__.py    | 15 +++++++--------
 pyproject.toml          |  5 +++--
 requirements.txt        |  3 +++
 4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0eeab0f2..bcaa0711 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -41,7 +41,7 @@ repos:
       - id: mypy
         name: mypy deepcave
         files: deepcave
-        args: [--check-untyped-defs, --ignore-missing-imports, --install-types, --non-interactive]
+        args: [--install-types, --non-interactive]
         additional_dependencies: [
             'wheel',
             'setuptools',
diff --git a/deepcave/__init__.py b/deepcave/__init__.py
index 19b39ecf..723db861 100644
--- a/deepcave/__init__.py
+++ b/deepcave/__init__.py
@@ -15,13 +15,6 @@
 from functools import wraps
 from pathlib import Path
 
-from dash_extensions.enrich import (
-    DashProxy,
-    MultiplexerTransform,
-    NoOutputTransform,
-    TriggerTransform,
-)
-
 name = "DeepCAVE"
 package_name = "deepcave"
 author = "R. Sass and E. Bergman and A. Biedenkapp and F. Hutter and M. Lindauer"
@@ -41,7 +34,7 @@
 ROOT_DIR = Path(__file__).parent
 
 
-def get_app(title: str) -> DashProxy:
+def get_app(title: str) -> Any:
     """
     Create the Dash application.
 
@@ -56,6 +49,12 @@ def get_app(title: str) -> DashProxy:
         The dash application.
     """
     import dash_bootstrap_components as dbc
+    from dash_extensions.enrich import (
+        DashProxy,
+        MultiplexerTransform,
+        NoOutputTransform,
+        TriggerTransform,
+    )
 
     app = DashProxy(
         __name__,
diff --git a/pyproject.toml b/pyproject.toml
index b30d8cf4..fc6b64e0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -53,14 +53,15 @@ add-ignore = [ # http://www.pydocstyle.org/en/stable/error_codes.html
 ]
 
 [tool.mypy]
-python_version = "3.8"
+python_version = "3.9"
 show_error_codes = true
 warn_unused_configs = true         # warn about unused [tool.mypy] lines
 follow_imports = "normal"          # Type check top level api code we use from imports
-ignore_missing_imports = true     # prefer explicit ignores
+ignore_missing_imports = true      # prefer explicit ignores
 disallow_untyped_defs = true       # All functions must have types
 disallow_untyped_decorators = true # ... even decorators
 disallow_incomplete_defs = true    # ... all types
+check_untyped_defs = true          # Problems are shown, even if def is check_untyped_defs
 
 [[tool.mypy.overrides]]
 module = ["setuptools.*"]     # Add modules that give import errors here
diff --git a/requirements.txt b/requirements.txt
index 177ef401..c3e05a18 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,5 @@
+# If something is changed here, change it in the pre-commit-hook under mypy additonal dependencies as well
+# otherwise mypy wont check the dependencies
 wheel
 setuptools
 absl-py>=1.0.0
@@ -5,6 +7,7 @@ jsonlines>=3.0.0
 pandas>=1.3.4
 numpy>=1.22.2
 matplotlib>=3.5.1
+seaborn>=0.13.0
 pyyaml
 
 # AutoML packages