Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dist: bionic
language: python
python: 3.7
python: 3.8

jobs:
include:
Expand All @@ -11,11 +11,17 @@ jobs:
- name: "mypy (typed-ast)"
python: 3.7
install: pip install -U git+git://github.com/python/mypy git+git://github.com/python/typed_ast
script: ./tests/mypy_test.py
script: ./tests/mypy_test.py --platform=linux
- name: "mypy (ast)"
python: 3.8-dev
python: 3.8
install: pip install -U git+git://github.com/python/mypy
script: ./tests/mypy_test.py
script: ./tests/mypy_test.py --platform=linux
- name: "mypy (Windows)"
install: pip install -U git+git://github.com/python/mypy
script: ./tests/mypy_test.py --platform=win32
- name: "mypy (Darwin)"
install: pip install -U git+git://github.com/python/mypy
script: ./tests/mypy_test.py --platform=darwin
- name: "mypy self test"
script: ./tests/mypy_selftest.py
- name: "check file consistency"
Expand Down
4 changes: 4 additions & 0 deletions tests/mypy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
parser.add_argument('-x', '--exclude', type=str, nargs='*', help="Exclude pattern")
parser.add_argument('-p', '--python-version', type=str, nargs='*',
help="These versions only (major[.minor])")
parser.add_argument('--platform',
help="Run mypy for a certain OS platform (defaults to sys.platform)")
parser.add_argument('--warn-unused-ignores', action='store_true',
help="Run mypy with --warn-unused-ignores "
"(hint: only get rid of warnings that are "
Expand Down Expand Up @@ -135,6 +137,8 @@ def main():
flags.append('--disallow-any-generics')
if args.warn_unused_ignores:
flags.append('--warn-unused-ignores')
if args.platform:
flags.extend(['--platform', args.platform])
sys.argv = ['mypy'] + flags + files
if args.verbose:
print("running", ' '.join(sys.argv))
Expand Down