[python] Add checker pd attr param and fix switch example#7818
Conversation
* Correct submit self.param to java gateway * Fix missing parameter for switch example * Add mechanism checker before submit to java gateway close: apache#7803
|
@devosend PTAL if you have time, thanks |
Codecov Report
@@ Coverage Diff @@
## dev #7818 +/- ##
============================================
+ Coverage 40.89% 41.00% +0.10%
- Complexity 3671 3684 +13
============================================
Files 637 637
Lines 26783 26934 +151
Branches 3017 3042 +25
============================================
+ Hits 10954 11045 +91
- Misses 14776 14823 +47
- Partials 1053 1066 +13
Continue to review full report at Codecov.
|
| @property | ||
| def param_json(self) -> Optional[List[Dict]]: | ||
| """Return param json base on self.param.""" | ||
| if self.param is None or not self.param: |
There was a problem hiding this comment.
Aren't these two judgment conditions the same?
There was a problem hiding this comment.
It is two behavior, one is for None and other for {}(empty dict). But we can also combine to single statement not self.param too.
There was a problem hiding this comment.
@devosend WDYT, should we combine or separate
There was a problem hiding this comment.
I think we should combine,beause and None and {} are empty. maybe we can add a comment.
There was a problem hiding this comment.
I'm going to add this
There was a problem hiding this comment.
LGTM
Thanks for your review
|
Kudos, SonarCloud Quality Gate passed! |








close: #7803