diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index bf27765f..5c0de5bf 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -31,7 +31,7 @@ COPY requirements.txt /requirements.txt RUN python3 -m pip install -r requirements.txt -RUN python3 -m pip install --upgrade flake8-pytest-importorskip click==8.0.4 black==24.4.2 flake8==4.0.1 +RUN python3 -m pip install --upgrade flake8-pytest-importorskip click==8.0.4 black==24.4.2 flake8==4.0.1 mypy==1.13.0 RUN groupadd -g ${USER_GID} ${USERNAME} && \ adduser --disabled-password --uid ${USER_UID} --gid ${USER_GID} --gecos "" ${USERNAME} && \ diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 93d1abfc..412c7101 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -37,19 +37,25 @@ jobs: python setup.py build_ext --inplace python -m pip list - - name: Update Black + - name: Update Black and mypy if: ${{ matrix.python-version == 3.9 }} run: | pip install flake8-pytest-importorskip pip install --upgrade click==8.0.4 pip install black==24.4.2 pip install flake8==4.0.1 + pip install mypy==1.13.0 - name: Lint and Format Check with Flake8 and Black if: ${{ matrix.python-version == 3.9 }} run: | black --diff --check . flake8 + + - name: Run type checking with mypy + if: ${{ matrix.python-version == 3.9 }} + run: | + mypy hatchet --pretty - name: Check License Headers run: | diff --git a/hatchet/graphframe.py b/hatchet/graphframe.py index ffddcc8f..0b5fb04a 100644 --- a/hatchet/graphframe.py +++ b/hatchet/graphframe.py @@ -1092,7 +1092,7 @@ def tree( if color is False: try: - import IPython + import IPython # type: ignore[import-not-found] shell = IPython.get_ipython().__class__.__name__ except ImportError: