-
Notifications
You must be signed in to change notification settings - Fork 14k
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
chore: Removes unused vars #20194
chore: Removes unused vars #20194
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20194 +/- ##
==========================================
+ Coverage 66.32% 66.48% +0.15%
==========================================
Files 1722 1737 +15
Lines 64639 64980 +341
Branches 6822 6896 +74
==========================================
+ Hits 42874 43202 +328
+ Misses 20031 20025 -6
- Partials 1734 1753 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset-frontend/packages/superset-ui-chart-controls/src/operators/flattenOperator.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-chart-controls/src/operators/flattenOperator.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-chart-controls/src/operators/prophetOperator.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-chart-controls/src/operators/prophetOperator.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-chart-controls/src/operators/resampleOperator.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-chart-controls/src/operators/contributionOperator.ts
Outdated
Show resolved
Hide resolved
Some interfaces need to be redundant and stable so that changes in the function interface can be easily tracked. IMO, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments from offline discussion:
Every operator generator receives 2 arguments to generate operator, the interface of PostProcessingFactory is
export interface PostProcessingFactory<T> {
(formData: QueryFormData, queryObject: QueryObject): T;
}
Even though we don’t use formData
or queryObject
in some operators, I suggest keeping the both arguments in function signature , if we remove them , each time a argument is added, then the prettier
will reformat the codes
@zhaoyongjie I prefer to omit the parameters here just like any other function. Especially because it's clearly typed as Prettier will reformat the code the same way as it would for any other function. I don't think adding |
How do we avoid reformat codes and increase changes? I think all of us often encounter changes to just one variable in a line, then change can become larger because of |
I really like the idea of reducing unnecessary changes but I don't think it's the case here. The variables are not being used, I don't think we should keep them to avoid a bigger diff during PR reviews. In fact, if one of these operators starts to use the arguments, then I would really like to see the signature change because it will clearly show that the variable is now being used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this cleanup! However, I agree with @zhaoyongjie 's comments about the unified signature for the post processing operators (they should be kept consistent)
@zhaoyongjie @villebro I disabled the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SUMMARY
Removes unused vars to get rid of
no-unused-vars
warnings.TESTING INSTRUCTIONS
1 - Execute all tests
2 - All tests should pass
ADDITIONAL INFORMATION