Skip to content

Commit

Permalink
Fixed for mypy (including issue lark-parser#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezsh committed Mar 17, 2020
1 parent 7aad07d commit 7538c93
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 6 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-stubs || true
run: mypy -m lark_stubs || true
1 change: 0 additions & 1 deletion lark/tools/standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from io import open
###}

import pprint
import codecs
import sys
import os
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions lark-stubs/exceptions.pyi → lark_stubs/exceptions.pyi
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -44,4 +45,5 @@ class UnexpectedCharacters(LexError, UnexpectedInput):


class VisitError(LarkError):
pass
obj: Union[Tree, Token]
orig_exc: Exception
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
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__',

Expand Down

0 comments on commit 7538c93

Please sign in to comment.