Repository navigation
[Lottie Exporter] Code cleanup for Lottie exporter plugin - #1226
Conversation
| cp3 = qp2 | ||
| cp1 = qp0 + 2/3*(qp1 - qp0) | ||
| cp2 = qp2 + 2/3*(qp1 - qp2) | ||
| cp1 = qp0 + 2/float(3)*(qp1 - qp0) |
There was a problem hiding this comment.
I think you can just use 3.0 here
There was a problem hiding this comment.
Made the changes which you've suggested.
2/(float(3) converted to 2/3.0 since both will do the same job.
|
@saurabh-ramola kindly link the issue to which this P.R. is related. |
|
This pull request fixes 8 alerts when merging 551054c into b380d8a - view on LGTM.com fixed alerts:
|
|
NOTE: Related to #958 |
| tangent = (p2 - p1) * (1.0 + bias) / 2.0 + (p3 - p2) * (1.0 - bias) / 2.0 | ||
| elif p1 > p2: | ||
| if p2 >= p1 or p2 <= p3: | ||
| if p2 <= p3: |
There was a problem hiding this comment.
You pointed out a mistake here actually.
It should have been p1 > p3 instead of p1 > p2 in line number 65.(See here:
This might also solve some other issues raised in the milestone of Lottie exporter
There was a problem hiding this comment.
So I recommend to change this in another PR, pointing out the mistake.
There was a problem hiding this comment.
Okay, I will do that.
There was a problem hiding this comment.
I suggest returning this line of code back. Here is the reason:
LGTM.com says that p2> = p1 has no effect, because you already checked elif p1 > p2.
But since there is an error in the first condition, you do not need to delete this condition, since it will become correct when you fix first condition (elif p1 > p2 -> elif p1 > p3).
|
This pull request fixes 8 alerts when merging 3df36db into b380d8a - view on LGTM.com fixed alerts:
|
|
@saurabh-ramola, I suggest to make this change in a new PR. |
|
This pull request fixes 8 alerts when merging ec5f7c8 into b380d8a - view on LGTM.com fixed alerts:
|
ec5f7c8 to
3df36db
Compare
|
I accidentally added the changes to the same PR. I have reverted that commit with the last known safe commit now. Will make a new PR for the issue. |
|
This pull request introduces 6 alerts and fixes 14 when merging beb51a8 into b380d8a - view on LGTM.com new alerts:
fixed alerts:
|
|
This pull request fixes 14 alerts when merging 0694af7 into b380d8a - view on LGTM.com fixed alerts:
|
|
@AnishGG , please have a look at the latest changes made. |
commented
Mar 13, 2020
|
Yup they look good. |
| tangent = (p2 - p1) * (1.0 + bias) / 2.0 + (p3 - p2) * (1.0 - bias) / 2.0 | ||
| elif p1 > p2: | ||
| if p2 >= p1 or p2 <= p3: | ||
| if p2 <= p3: |
There was a problem hiding this comment.
I suggest returning this line of code back. Here is the reason:
LGTM.com says that p2> = p1 has no effect, because you already checked elif p1 > p2.
But since there is an error in the first condition, you do not need to delete this condition, since it will become correct when you fix first condition (elif p1 > p2 -> elif p1 > p3).
commented
Mar 13, 2020
|
This pull request fixes 13 alerts when merging 04285b8 into b380d8a - view on LGTM.com fixed alerts:
|
commented
Mar 13, 2020
|
Merged. Thank you! |
Cleaned up the code for Lottie Exporter plugin and removed LGTM warning alerts. In #1199 I had focussed only on adding changes tagged as recommendations.
Link for the alerts : LGTM warning alerts for the Lottie Exporter plugin
@AnishGG , @ice0 Please have a look at this