diff --git a/MANIFEST.in b/MANIFEST.in index 74215c3..e524258 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ +include LICENSE +include py.typed include README.md -include LICENSE \ No newline at end of file diff --git a/py.typed b/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index ba0be30..6da8137 100644 --- a/setup.py +++ b/setup.py @@ -31,5 +31,8 @@ entry_points={ 'console_scripts': ['apertium-streamparser=streamparser:main'], }, + package_data={ + 'streamparser': ['py.typed'], + }, py_modules=['streamparser'], ) diff --git a/streamparser.py b/streamparser.py index d9c140a..41b9a3d 100644 --- a/streamparser.py +++ b/streamparser.py @@ -15,7 +15,7 @@ __credits__ = ['Sushain K. Cherivirala', 'Kevin Brubeck Unhammer'] __license__ = 'GPLv3+' __status__ = 'Production' -__version__ = '5.0.2' +__version__ = '5.0.3' import fileinput import functools @@ -192,8 +192,8 @@ def parse(stream, with_text=False): # type: (Iterator[str], bool) -> Iterator[U with_text (bool, optional): A boolean defining whether to output preceding text with each lexical unit. Yields: - LexicalUnit: The next lexical unit found in the character stream. (if withText is False) - (str, LexicalUnit): The next lexical unit found in the character stream and the the text that seperated it from the prior unit in a tuple. (if withText is True) + LexicalUnit: The next lexical unit found in the character stream. (if with_text is False) + (str, LexicalUnit): The next lexical unit found in the character stream and the the text that seperated it from the prior unit in a tuple. (if with_text is True) """ buffer = ''