szaszm commented on code in PR #2237:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2237#discussion_r3796396546
##########
behave_framework/src/minifi_behave/containers/container_linux.py:
##########
@@ -333,34 +388,46 @@ def _get_contents_of_all_files_in_directory(self,
directory_path: str) -> list[s
exit_code, content = self.exec_run(read_command)
if exit_code != 0:
- error_message = f"Command to read file '{path}' failed with
exit code {exit_code}"
- logging.error(error_message)
+ error_message = (
+ f"Command to read file '{path}' failed with exit code
{exit_code}"
+ )
Review Comment:
I find this reformatting weird, why change it from a single line?
Since it's automated reformatting, I don't mind it, just wanted to bring
some attention to this.
##########
behave_framework/src/minifi_behave/steps/core_steps.py:
##########
@@ -71,76 +85,138 @@ def __add_directory_with_file_to_container(context:
MinifiTestContext, directory
dirs.append(new_dir)
-@step('a directory at "{directory}" has a file with the content "{content}" in
the "{flow_name}" flow')
-@step("a directory at '{directory}' has a file with the content '{content}' in
the '{flow_name}' flow")
-def create_file_with_content_in_directory_for_flow(context: MinifiTestContext,
directory: str, content: str, flow_name: str):
- __add_directory_with_file_to_container(context, directory,
str(uuid.uuid4()), content, flow_name)
+@step(
+ 'a directory at "{directory}" has a file with the content "{content}" in
the "{flow_name}" flow'
+)
+@step(
+ "a directory at '{directory}' has a file with the content '{content}' in
the '{flow_name}' flow"
+)
+def create_file_with_content_in_directory_for_flow(
+ context: MinifiTestContext, directory: str, content: str, flow_name: str
+):
+ __add_directory_with_file_to_container(
+ context, directory, str(uuid.uuid4()), content, flow_name
+ )
Review Comment:
same, we're expanding 4 lines into 11 slightly shorter lines, I don't think
this improves readability, but if the python community consensus suggests this,
then I won't complain
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]