Browse Source

Merge branch 'master' into stub-fix

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.8.3
nic 5 years ago
parent
commit
505e0a98c5
12 changed files with 8 additions and 6 deletions
  1. +1
    -1
      .github/workflows/mypy.yml
  2. +1
    -0
      lark/parsers/xearley.py
  3. +0
    -1
      lark/tools/standalone.py
  4. +0
    -0
      lark_stubs/__init__.pyi
  5. +4
    -2
      lark_stubs/exceptions.pyi
  6. +0
    -0
      lark_stubs/indenter.pyi
  7. +0
    -0
      lark_stubs/lark.pyi
  8. +0
    -0
      lark_stubs/lexer.pyi
  9. +0
    -0
      lark_stubs/reconstruct.pyi
  10. +0
    -0
      lark_stubs/tree.pyi
  11. +0
    -0
      lark_stubs/visitors.pyi
  12. +2
    -2
      setup.py

+ 1
- 1
.github/workflows/mypy.yml View File

@@ -16,4 +16,4 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install mypy pip install mypy
- name: Lint with mypy - name: Lint with mypy
run: mypy -m lark-stubs || true
run: mypy -m lark_stubs || true

+ 1
- 0
lark/parsers/xearley.py View File

@@ -93,6 +93,7 @@ class Parser(BaseParser):
if token is not None: if token is not None:
token.end_line = text_line token.end_line = text_line
token.end_column = text_column + 1 token.end_column = text_column + 1
token.end_pos = i + 1


new_item = item.advance() new_item = item.advance()
label = (new_item.s, new_item.start, i) label = (new_item.s, new_item.start, i)


+ 0
- 1
lark/tools/standalone.py View File

@@ -28,7 +28,6 @@ import os
from io import open from io import open
###} ###}


import pprint
import codecs import codecs
import sys import sys
import os import os


lark-stubs/__init__.pyi → lark_stubs/__init__.pyi View File


lark-stubs/exceptions.pyi → lark_stubs/exceptions.pyi View File

@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


from typing import Dict, Iterable, Callable
from typing import Dict, Iterable, Callable, Union
from .tree import Tree from .tree import Tree
from .lexer import Token




class LarkError(Exception): class LarkError(Exception):
@@ -44,4 +45,5 @@ class UnexpectedCharacters(LexError, UnexpectedInput):




class VisitError(LarkError): class VisitError(LarkError):
pass
obj: Union[Tree, Token]
orig_exc: Exception

lark-stubs/indenter.pyi → lark_stubs/indenter.pyi View File


lark-stubs/lark.pyi → lark_stubs/lark.pyi View File


lark-stubs/lexer.pyi → lark_stubs/lexer.pyi View File


lark-stubs/reconstruct.pyi → lark_stubs/reconstruct.pyi View File


lark-stubs/tree.pyi → lark_stubs/tree.pyi View File


lark-stubs/visitors.pyi → lark_stubs/visitors.pyi View File


+ 2
- 2
setup.py View File

@@ -6,12 +6,12 @@ __version__ ,= re.findall('__version__ = "(.*)"', open('lark/__init__.py').read(
setup( setup(
name = "lark-parser", name = "lark-parser",
version = __version__, version = __version__,
packages = ['lark', 'lark.parsers', 'lark.tools', 'lark.grammars', 'lark-stubs'],
packages = ['lark', 'lark.parsers', 'lark.tools', 'lark.grammars', 'lark_stubs'],


requires = [], requires = [],
install_requires = [], install_requires = [],


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


test_suite = 'tests.__main__', test_suite = 'tests.__main__',




Loading…
Cancel
Save