Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge latest master into v1.0 #959

Merged
merged 1 commit into from
Aug 17, 2021
Merged

Merge latest master into v1.0 #959

merged 1 commit into from
Aug 17, 2021

Conversation

erezsh
Copy link
Member

@erezsh erezsh commented Aug 17, 2021

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2021

Codecov Report

Merging #959 (e30eef7) into v1.0 (3e2a61a) will increase coverage by 0.27%.
The diff coverage is 92.51%.

Impacted file tree graph

@@            Coverage Diff             @@
##             v1.0     #959      +/-   ##
==========================================
+ Coverage   87.34%   87.61%   +0.27%     
==========================================
  Files          49       49              
  Lines        6794     6879      +85     
==========================================
+ Hits         5934     6027      +93     
+ Misses        860      852       -8     
Flag Coverage Δ
unittests 87.61% <92.51%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lark/ast_utils.py 0.00% <ø> (ø)
lark/parsers/lalr_interactive_parser.py 77.77% <0.00%> (ø)
lark/lark.py 83.77% <42.85%> (ø)
lark/exceptions.py 86.00% <50.00%> (-0.58%) ⬇️
lark/common.py 95.34% <66.66%> (-2.16%) ⬇️
lark/utils.py 86.13% <86.66%> (+2.13%) ⬆️
lark/parser_frontends.py 95.23% <88.88%> (ø)
lark/parse_tree_builder.py 97.20% <92.00%> (+2.79%) ⬆️
lark/lexer.py 93.33% <95.08%> (+0.15%) ⬆️
lark/load_grammar.py 92.60% <100.00%> (+0.41%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e2a61a...e30eef7. Read the comment docs.

@erezsh erezsh requested a review from MegaIng August 17, 2021 08:27
@@ -136,10 +137,13 @@ def _format_expected(self, expected):


class UnexpectedEOF(ParseError, UnexpectedInput):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't lalr not raising this exception? Seems also like a good change for 1.0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. But that's for another PR.

@@ -158,20 +158,20 @@ class Token(str):

def __new__(cls, type_, value, start_pos=None, line=None, column=None, end_line=None, end_column=None, end_pos=None):
try:
self = super(Token, cls).__new__(cls, value)
inst = super(Token, cls).__new__(cls, value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this naming change: After getting an instant via super.__name__, we are initializing it like a __init__ would. No reason not to treat it like that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I don't have a strong preference either way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, let me try to push back by a little -

we are initializing it like a init would.

Not quite, in __init__ there is no need to return self.

It is also quite unusual to assign to self. In other language, where self/this are builtin, that would not be allowed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah fair enough. I don't feel to strong either.

@erezsh erezsh merged commit b79c449 into v1.0 Aug 17, 2021
@erezsh erezsh deleted the v1.0-merge-master branch August 17, 2021 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants