diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5dc3fe1..32be2e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: run: | pytest - name: run mypy - run: mypy sqlite_utils + run: mypy sqlite_utils tests - name: run flake8 run: flake8 - name: Check formatting diff --git a/setup.py b/setup.py index 65fe6f7..0d3e456 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ setup( extras_require={ "test": ["pytest", "black", "hypothesis"], "docs": ["sphinx_rtd_theme", "sphinx-autobuild", "codespell"], - "mypy": ["mypy", "types-click", "types-tabulate", "types-python-dateutil"], + "mypy": ["mypy", "types-click", "types-tabulate", "types-python-dateutil", "data-science-types"], "flake8": ["flake8"], }, entry_points=""" diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index e4c1d5c..4677733 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -197,7 +197,7 @@ if np: # If pandas is available, add more types if pd: - COLUMN_TYPE_MAPPING.update({pd.Timestamp: "TEXT"}) + COLUMN_TYPE_MAPPING.update({pd.Timestamp: "TEXT"}) # type: ignore class AlterError(Exception): diff --git a/tests/test_create.py b/tests/test_create.py index ff36f90..58dda95 100644 --- a/tests/test_create.py +++ b/tests/test_create.py @@ -20,9 +20,9 @@ import uuid from .utils import collapse_whitespace try: - import pandas as pd + import pandas as pd # type: ignore except ImportError: - pd = None + pd = None # type: ignore def test_create_table(fresh_db):