8000 Add basic stubs for some class attributes by alanhdu · Pull Request #9 · numpy/numpy-stubs · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Add basic stubs for some class attributes #9

Merged
merged 10 commits into from
Feb 19, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Setup Travis and correct setup.py (#8)
* Replace tab in setup.py with spaces

* Add Travis

* Add flake8 config to pass tests

* Use `-` instead of `_`

See python/peps#568

* Add Travis badge to README

* Use numpy 1.14.0
  • Loading branch information
Alan Du authored and alanhdu committed Feb 18, 2018
commit b814fac0d75ea26230c78503f7c3ed5b41081399
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.mypy_cache
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down
9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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'
},
)
3 changes: 3 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
flake8==3.3.0

mypy==0.560.0
0