Skip to content
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

WIP: don't merge #66

Closed
wants to merge 5 commits into from
Closed

WIP: don't merge #66

wants to merge 5 commits into from

Conversation

Alc-Alc
Copy link
Collaborator

@Alc-Alc Alc-Alc commented Feb 27, 2024

Pull Request Checklist

  • New code has 100% test coverage
  • (If applicable) The prose documentation has been updated to reflect the changes introduced by this PR
  • (If applicable) The reference documentation has been updated to reflect the changes introduced by this PR
  • Pre-Commit Checks were ran and passed
  • Tests were ran and passed

Description

Close Issue(s)

Copy link

railway-app bot commented Feb 27, 2024

This PR was not deployed automatically as @Alc-Alc does not have access to the Railway project.

In order to get automatic PR deploys, please add @Alc-Alc to the project inside the project settings page.

@Alc-Alc Alc-Alc closed this Feb 27, 2024
@Alc-Alc Alc-Alc deleted the delete branch February 27, 2024 18:34
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

PR Type: Enhancement

PR Summary: This pull request introduces several enhancements and new features to the project. It includes changes to logging and settings configurations, introduces new utility functions for formatting and querying rules, and adds a new plugin for Astral Inc. related software. Additionally, it updates references to external resources and modifies the handling of certain settings to ignore extra fields.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
📝 Issue not addressed: this change does not correctly address the issue or implement the desired feature.
No details provided.
📝 Complexity: the changes are too large or complex for Sourcery to approve.
  • Unsupported files: the diff contains files that Sourcery does not currently support during reviews.

General suggestions:

  • Ensure that all new functionalities introduced are accompanied by adequate documentation updates. This includes both prose and reference documentation, if applicable.
  • Review the security implications of using subprocesses, especially in functions like run_ruff_format. Consider implementing additional input sanitization or alternative methods to mitigate potential security risks.
  • Given the PR title 'WIP: don't merge', ensure that all work-in-progress aspects of the PR are completed and thoroughly tested before merging. This includes addressing any known issues or TODOs in the code.
  • Verify that the changes made to settings configurations, such as the addition of the 'extra="ignore"' parameter, align with the project's overall configuration management strategy and do not inadvertently suppress important configuration errors.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +242 to +258
def run_ruff_format(code: str) -> str:
"""Formats code using Ruff.

Args:
code: The code to format.

Returns:
str: The formatted code.
"""
result = subprocess.run(
["ruff", "format", "-"], # noqa: S603, S607
input=code,
capture_output=True,
text=True,
check=False,
)
return result.stdout if result.returncode == 0 else code
Copy link
Contributor

Choose a reason for hiding this comment

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

🚨 security (llm): Using subprocess.run with shell=True can be a security hazard if untrusted input is passed as part of the command. Ensure that code is sanitized or consider using a safer alternative to execute the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants