Skip to content

Commit

Permalink
Split out stubs.
Browse files Browse the repository at this point in the history
  • Loading branch information
KmolYuan committed Feb 15, 2020
1 parent 34d3ff9 commit 39aa08d
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
python -m pip install --upgrade pip
pip install mypy
- name: Lint with mypy
run: mypy -m lark || true
run: mypy -m lark-stubs || true
10 changes: 10 additions & 0 deletions lark-stubs/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-

from .tree import Tree
from .visitors import Transformer, Visitor, v_args, Discard
from .visitors import InlineTransformer, inline_args # XXX Deprecated
from .exceptions import ParseError, LexError, GrammarError, UnexpectedToken, UnexpectedInput, UnexpectedCharacters
from .lexer import Token
from .lark import Lark

__version__: str
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file removed lark/py.typed
Empty file.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import re
from setuptools import setup
from setuptools import find_packages, setup

__version__ ,= re.findall('__version__ = "(.*)"', open('lark/__init__.py').read())

setup(
name = "lark-parser",
version = __version__,
packages = ['lark', 'lark.parsers', 'lark.tools', 'lark.grammars'],
packages = ['lark', 'lark.parsers', 'lark.tools', 'lark.grammars', 'lark-stubs'],

requires = [],
install_requires = [],

package_data = { '': ['*.md', '*.lark', '*.pyi'], 'lark': ['py.typed'] },
package_data = {'': ['*.md', '*.lark'], 'lark-stubs': ['*.pyi']},

test_suite = 'tests.__main__',

Expand Down

0 comments on commit 39aa08d

Please sign in to comment.