Skip to content

Commit

Permalink
Make typechecking with mypy possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
takeda committed Dec 12, 2018
1 parent 070a7ce commit c1e3abe
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.eggs/
/.idea/
/build/
/dist/
/*.egg-info/
__pycache__/
*.c
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ REQUIREMENTS
INSTALL
=======

Run `pip install .`
Run `pip install mondemand`

Example Run
===========
Expand Down
3 changes: 3 additions & 0 deletions mondemand/lwes_transport.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from __future__ import absolute_import

from typing import AnyStr, Optional

from ._mondemand import ffi, lib
from .utils import text_to_cstring


class LwesTransport(object):
def __init__(self, address, port, interface=None, heartbeat_flag=0,
heartbeat_frequency=0, ttl=30):
# type: (AnyStr, int, Optional[AnyStr], int, int, int) -> None

transport = lib.mondemand_transport_lwes_create_with_ttl(
text_to_cstring(address), port, text_to_cstring(interface) if interface else ffi.NULL,
Expand Down
Empty file added mondemand/py.typed
Empty file.
10 changes: 8 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,25 @@ classifiers=
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Topic :: Software Development :: Libraries :: Python Modules

[options]
python_requires= >=2.7, !=3.0, !=3.1, !=3.2, !=3.3, !=3.4
packages=find:
zip_safe=false
python_requires=
>=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
setup_requires=
setuptools_scm
cffi ~= 1.11.5
install_requires=
cffi ~= 1.11.5
six
typing
packages=find:

[options.package_data]
mondemand=
py.typed

0 comments on commit c1e3abe

Please sign in to comment.