Run mypy against tests/ too, refs #37

This commit is contained in:
Simon Willison 2021-08-18 14:48:05 -07:00
commit c62363ebdc
4 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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="""

View file

@ -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):

View file

@ -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):