diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d7f7a42 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.mypy_cache diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..56e670d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: python +python: 3.6 + +notifications: + email: false + +install: +- pip install -r test-requirements.txt +- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install flake8-pyi==17.3.0; fi + +script: +- flake8 +- MYPYPATH="." mypy tests/test_simple.py + +cache: + directories: + - "$HOME/.cache/pip" diff --git a/README.md b/README.md index 50530fb..72331bd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # numpy_stubs: experimental typing stubs for NumPy +[![Build Status](https://travis-ci.org/numpy/numpy_stubs.svg?branch=master)](https://travis-ci.org/numpy/numpy_stubs) + This repository exists for developing [PEP 484](https://www.python.org/dev/peps/pep-0484/) compatible typing annotations for [NumPy](https://github.com/numpy/numpy). diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..c41dd87 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,9 @@ +# Ignore the following errors (for stubs): +# E301 expected 1 blank line, found 0 +# E302 expected 2 blank lines, found 1 +# E305 expected 2 blank lines after class or function definition, found 1 +# E701 multiple statements on one line (colon) +# E704 multiple statements on one line (def) + +[flake8] +ignore = E301, E302, E305, E701, E704 diff --git a/setup.py b/setup.py index d3ce124..14ff408 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup( - name='numpy_stubs', + name='numpy-stubs', maintainer="NumPy Developers", maintainer_email="numpy-discussion@python.org", description="PEP 561 type stubs for numpy", @@ -11,8 +11,8 @@ packages=find_packages(), # PEP 561 requires these - install_requires=['numpy~=1.13.0'], + install_requires=['numpy~=1.14.0'], package_data={ - 'numpy': 'py.typed' + 'numpy': 'py.typed' }, ) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..5c8d95b --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,3 @@ +flake8==3.3.0 + +mypy==0.560.0