-
Notifications
You must be signed in to change notification settings - Fork 200
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,12 @@ | |
script += "\n" | ||
|
||
for block_name, block in conf.blocks.items(): | ||
parameters = block.parameters | ||
if hasattr(block, "parameters"): | ||
parameters = block.parameters | ||
else: | ||
print(f"{block_name=}, {block=} does not have parameters") | ||
continue | ||
Comment on lines
+108
to
+112
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
||
parameters_string = ( | ||
", ".join( | ||
[f"{p_name}:{p.type}={p.value}" for p_name, p in parameters.items()] | ||
|
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.