Erez Sh
8c839959ad
Fixed .pyi file for Token.start_pos
3 years ago
Erez Sh
1d61de4f94
Fix .pyi files
4 years ago
Brice Arnould
781ae59b3c
type stubs: A consistent type for `Token.value`
The Token's value is described as being a in the attribute list: 460a221923/lark-stubs/lexer.pyi (L84)
and as `Any` in `__init__` parameters: 460a221923/lark-stubs/lexer.pyi (L91)
Yet one of the recipes, [Use a transformer to parse integer tokens](https://github.com/lark-parser/lark/blob/master/docs/recipes.md#use-a-transformer-to-parse-integer-tokens ), recommends to set it to other types. So IIUC, `Any` is the correct one.
4 years ago
MegaIng1
8ec6d0f2ab
Correction for PR
- `user_repr` is now a method
- Fix for python 2.7
- excepts -> expected
4 years ago
MegaIng1
4e442bc0b8
regression-fix for #760
4 years ago
Greg Ward
68e5e86b5b
Add missing type hint for Token constructor
mypy thinks that Token's __init__ is inherited from __str__(). That's
not wrong -- it's just irrelevant, because Token also implements
__new__(). Token's _effective_ constructor signature is determined by
its __new__() method, so that's what I have used in the type hint.
Not clear if 'value' is supposed to be Any, but that's what I need in
my application. And it works just fine!
4 years ago
Erez Sh
5b30ba4841
Cleanup, and a few PEP8 changes
4 years ago
julienmalard
09e80a5c9e
Fixed tests
4 years ago
julienmalard
e22536fc9b
Updated stubs
4 years ago
Erez Sh
f04a2167d6
Fixes to mypy stubs (Issue #561 )
4 years ago
MegaIng1
926c98bd41
Renamed global_flags to g_regex_flags
4 years ago
MegaIng1
3a97029853
Added global_flags option to Lark (+ test)
4 years ago
Erez Sh
7538c93080
Fixed for mypy (including issue #532 )
5 years ago
KmolYuan
d0f9f715f3
Remove non-public classes in lexer.pyi.
5 years ago
KmolYuan
803b1fe79e
Apply changes and extend more names.
5 years ago
KmolYuan
39aa08d223
Split out stubs.
5 years ago
KmolYuan
25db16dd73
Add stubs for PEP 561.
5 years ago