Skip to content

MINIFICPP-2870 Lint/Check python code with ruff - #2237

Open
martinzink wants to merge 11 commits into
mainfrom
ruff_2
Open

MINIFICPP-2870 Lint/Check python code with ruff#2237
martinzink wants to merge 11 commits into
mainfrom
ruff_2

Conversation

@martinzink

Copy link
Copy Markdown
Member

MINIFICPP-2870 Lint/Check python code with ruff

I've deliberetly done the PR in multiple commits, because that would make the review process much easier.


Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically main)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.

@martinzink martinzink changed the title MINIFICPP-2870 Lint/Check python code with ruff- #2222 MINIFICPP-2870 Lint/Check python code with ruff Aug 10, 2026
@martinzink martinzink added low-impact Test only or trivial change that's most likely not gonna introduce any new bugs minifi-behave labels Aug 10, 2026
@lordgamez
lordgamez self-requested a review August 14, 2026 09:58
Comment on lines +391 to +393
error_message = (
f"Command to read file '{path}' failed with exit code {exit_code}"
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +88 to 100
@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
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

low-impact Test only or trivial change that's most likely not gonna introduce any new bugs minifi-behave

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants