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

A bit of cleanup, improve test coverage #1020

Merged
merged 2 commits into from
Oct 19, 2021
Merged

A bit of cleanup, improve test coverage #1020

merged 2 commits into from
Oct 19, 2021

Conversation

erezsh
Copy link
Member

@erezsh erezsh commented Oct 19, 2021

Not sure there's anything to review, but just in case.

@erezsh erezsh requested a review from MegaIng October 19, 2021 10:13
else:
titem = TransitiveItem(origin, trule, originator, start)
previous = transitives[start][origin] = titem
# def create_leo_transitives(origin, start):
Copy link
Member

Choose a reason for hiding this comment

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

Why leave it as a comment? If we need it later, we still have git history

Copy link
Member Author

Choose a reason for hiding this comment

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

We'll probably forget it even exists..

Now it's almost like a TODO. But perhaps I can replace it with a TODO and a git-ref

before = ( expansion.name for expansion in self.rule.expansion[:self.ptr] )
after = ( expansion.name for expansion in self.rule.expansion[self.ptr:] )
return '{} : {} -> {}* {} ({}, {})'.format(self.recognized.name, self.rule.origin.name, ' '.join(before), ' '.join(after), self.column, self.start)
# class TransitiveItem(Item):
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2021

Codecov Report

Merging #1020 (5471f88) into master (d0d67b8) will increase coverage by 0.65%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1020      +/-   ##
==========================================
+ Coverage   87.11%   87.77%   +0.65%     
==========================================
  Files          50       50              
  Lines        7208     7155      -53     
==========================================
+ Hits         6279     6280       +1     
+ Misses        929      875      -54     
Flag Coverage Δ
unittests 87.77% <100.00%> (+0.65%) ⬆️

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

Impacted Files Coverage Δ
lark/parsers/earley_common.py 85.18% <ø> (+22.14%) ⬆️
lark/tree.py 69.17% <ø> (+3.47%) ⬆️
lark/exceptions.py 86.00% <100.00%> (ø)
lark/parsers/earley.py 82.03% <100.00%> (+14.05%) ⬆️
lark/parsers/lalr_interactive_parser.py 77.77% <100.00%> (ø)
tests/test_parser.py 94.71% <100.00%> (+<0.01%) ⬆️
tests/test_trees.py 98.94% <100.00%> (+0.01%) ⬆️

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 d0d67b8...5471f88. Read the comment docs.

@erezsh erezsh merged commit 0953036 into master Oct 19, 2021
@erezsh erezsh deleted the cleanup_oct2021 branch October 19, 2021 12:46
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