Skip to content

Commit

Permalink
Add direct type-check to Travis CI (#24)
Browse files Browse the repository at this point in the history
...and fix the error found.
  • Loading branch information
ilevkivskyi committed Sep 20, 2018
1 parent 56f42c0 commit 93237cc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .travis.yml
Expand Up @@ -11,14 +11,20 @@ jobs:
python: 3.6
script: |
set -e
export PYTHONPATH=`pwd`/external/mypy
pytest
- name: "run test suite with python 3.7"
python: 3.7
script: |
set -e
export PYTHONPATH=`pwd`/external/mypy
pytest
- name: "run direct typecheck"
python: 3.6
script: |
set -e
mkdir tmpd
cp -r sqlalchemy-stubs tmpd/sqlalchemy
cd tmpd
python3 -m mypy -p sqlalchemy
- name: "run flake8 on stubs"
python: 3.6
script: |
Expand All @@ -33,3 +39,4 @@ install: |
pip install -r external/mypy/test-requirements.txt
pip install -U .
python2 -m pip install --user -U .
export PYTHONPATH=`pwd`/external/mypy
2 changes: 1 addition & 1 deletion sqlalchemy-stubs/engine/strategies.pyi
Expand Up @@ -20,7 +20,7 @@ class ThreadLocalEngineStrategy(DefaultEngineStrategy):

class MockEngineStrategy(EngineStrategy):
name: str = ...
def create(self, name_or_url, executor, **kwargs) -> MockEngineStrategy.MockConnection: ...
def create(self, name_or_url, executor, **kwargs) -> MockEngineStrategy.MockConnection: ... # type: ignore
class MockConnection(base.Connectable):
execute: Any = ...
def __init__(self, dialect, execute) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion sqlalchemy-stubs/sql/schema.pyi
Expand Up @@ -53,7 +53,7 @@ class Column(SchemaItem, ColumnClause, Generic[_T]):
__visit_name__: str = ...
key: Any = ...
primary_key: Any = ...
nullable: Any = ...
nullable: bool = ...
default: Any = ...
server_default: Any = ...
server_onupdate: Any = ...
Expand Down

0 comments on commit 93237cc

Please sign in to comment.