Skip to content

Commit c62363e

Browse files
committed
Run mypy against tests/ too, refs #37
1 parent 7479933 commit c62363e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
pytest
3535
- name: run mypy
36-
run: mypy sqlite_utils
36+
run: mypy sqlite_utils tests
3737
- name: run flake8
3838
run: flake8
3939
- name: Check formatting

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_long_description():
3333
extras_require={
3434
"test": ["pytest", "black", "hypothesis"],
3535
"docs": ["sphinx_rtd_theme", "sphinx-autobuild", "codespell"],
36-
"mypy": ["mypy", "types-click", "types-tabulate", "types-python-dateutil"],
36+
"mypy": ["mypy", "types-click", "types-tabulate", "types-python-dateutil", "data-science-types"],
3737
"flake8": ["flake8"],
3838
},
3939
entry_points="""

sqlite_utils/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class Default:
197197

198198
# If pandas is available, add more types
199199
if pd:
200-
COLUMN_TYPE_MAPPING.update({pd.Timestamp: "TEXT"})
200+
COLUMN_TYPE_MAPPING.update({pd.Timestamp: "TEXT"}) # type: ignore
201201

202202

203203
class AlterError(Exception):

tests/test_create.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
from .utils import collapse_whitespace
2121

2222
try:
23-
import pandas as pd
23+
import pandas as pd # type: ignore
2424
except ImportError:
25-
pd = None
25+
pd = None # type: ignore
2626

2727

2828
def test_create_table(fresh_db):

0 commit comments

Comments
 (0)