Browse Source

Fixed for mypy (including issue #532)

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

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

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

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

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

import pprint
import codecs
import sys
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 -*-

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


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


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(
name = "lark-parser",
version = __version__,
packages = ['lark', 'lark.parsers', 'lark.tools', 'lark.grammars', 'lark-stubs'],
packages = ['lark', 'lark.parsers', 'lark.tools', 'lark.grammars', 'lark_stubs'],

requires = [],
install_requires = [],

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

test_suite = 'tests.__main__',



Loading…
Cancel
Save