-
Notifications
You must be signed in to change notification settings - Fork 188
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
more_robust_updk_import #2722
more_robust_updk_import #2722
Conversation
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.
Hey @joamatab - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
if hasattr(block, "parameters"): | ||
parameters = block.parameters | ||
else: | ||
print(f"{block_name=}, {block=} does not have parameters") |
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.
suggestion (code_refinement): Consider replacing print statement with logging.
Using logging instead of print allows better control over the output and can be configured to include more information such as timestamps or log levels.
print(f"{block_name=}, {block=} does not have parameters") | |
import logging | |
logger = logging.getLogger(__name__) | |
if hasattr(block, "parameters"): | |
parameters = block.parameters | |
else: | |
logger.warning(f"{block_name=}, {block=} does not have parameters") | |
continue |
if hasattr(block, "parameters"): | ||
parameters = block.parameters | ||
else: | ||
print(f"{block_name=}, {block=} does not have parameters") | ||
continue |
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.
suggestion (testing): Missing test for the new conditional logic handling blocks without parameters.
The addition of conditional checks for 'parameters' attribute in blocks requires corresponding unit tests to verify that blocks without parameters are handled correctly and that the function continues as expected.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2722 +/- ##
==========================================
- Coverage 71.74% 71.73% -0.01%
==========================================
Files 366 366
Lines 23815 23818 +3
Branches 3882 3883 +1
==========================================
Hits 17086 17086
- Misses 5603 5605 +2
- Partials 1126 1127 +1 ☔ View full report in Codecov by Sentry. |
No description provided.