This website works better with JavaScript.
Home
Explore
Help
Sign In
jmg
/
gitmirror
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
39
Wiki
Activity
Browse Source
Guard Lark.__doc__ assignment for tools.standalone
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.11.0
Tom Ritchford
4 years ago
parent
809b0308a4
commit
fb925f8b31
2 changed files
with
3 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-1
lark/lark.py
+1
-1
tests/test_tools.py
+ 2
- 1
lark/lark.py
View File
@@ -310,7 +310,8 @@ class Lark(Serialize):
with FS.open(cache_fn, 'wb') as f:
self.save(f)
__doc__ += "\n\n" + LarkOptions.OPTIONS_DOC
if __doc__:
__doc__ += "\n\n" + LarkOptions.OPTIONS_DOC
__serialize_fields__ = 'parser', 'rules', 'options'
+ 1
- 1
tests/test_tools.py
View File
@@ -25,7 +25,7 @@ class TestStandalone(TestCase):
standalone.main(StringIO(grammar), 'start', print=pr)
code = code_buf.getvalue()
context = {}
context = {
'__doc__': None
}
exec(code, context)
return context
Write
Preview
Loading…
Cancel
Save