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
Add more ruff rules, fix pointed problems, add tests #910
Conversation
@@ -272,7 +272,7 @@ def _make_class(typename, types, defaults_dict, base_classes, readonly): | |||
global_state["__name__"] = f"serialize_{typename}" | |||
try: | |||
# pylint: disable=W0122 | |||
exec(class_definition, global_state) # nosec | |||
exec(class_definition, global_state) # nosec # noqa: S102 |
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.
Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.
Created by exec-detected.
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.01%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Pull Request #910 refactored by [Sourcery](https://sourcery.ai/github/). If you're happy with these changes, merge this Pull Request using the *Squash and merge* strategy. **NOTE**: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically. See our documentation [here](https://docs.sourcery.ai/GitHub/Using-Sourcery-for-GitHub/). <details> <summary>Run Sourcery locally</summary> <p> Reduce the feedback loop during development by using the Sourcery editor plugin: </p> <ul> <li><a href="https://sourcery.ai/download/?editor=vscode">VS Code</a></li> <li><a href="https://sourcery.ai/download/?editor=pycharm">PyCharm</a></li> </ul> </details> <details> <summary>Review changes via command line</summary> <p>To manually merge these changes, make sure you're on the <code>upgrade_ruff_configuration</code> branch, then run:</p> <pre> git fetch origin sourcery/upgrade_ruff_configuration git merge --ff-only FETCH_HEAD git reset HEAD^ </pre> </details> Help us [improve](https://research.typeform.com/to/j06Spdfr?type=pr_refactor&github_login=Czaki&base_repo=https%3A%2F%2Fgithub.com%2F4DNucleome%2FPartSeg.git&base_remote_ref=refs%2Fpull%2F910%2Fhead&base_ref=upgrade_ruff_configuration&base_sha=185d8a030287b111e46a4e58cc65b2505d3c97ab&head_repo=https%3A%2F%2Fgithub.com%2F4DNucleome%2FPartSeg.git&head_ref=sourcery%2Fupgrade_ruff_configuration&base_pr_number=910&base_pr_state=open) this pull request! Co-authored-by: Sourcery AI <>
Preview page for your plugin is ready here: |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #910 +/- ##
===========================================
+ Coverage 91.16% 91.26% +0.09%
===========================================
Files 197 197
Lines 30333 30365 +32
===========================================
+ Hits 27653 27712 +59
+ Misses 2680 2653 -27
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Pull Request #910 refactored by [Sourcery](https://sourcery.ai/github/). If you're happy with these changes, merge this Pull Request using the *Squash and merge* strategy. **NOTE**: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically. See our documentation [here](https://docs.sourcery.ai/GitHub/Using-Sourcery-for-GitHub/). <details> <summary>Run Sourcery locally</summary> <p> Reduce the feedback loop during development by using the Sourcery editor plugin: </p> <ul> <li><a href="https://sourcery.ai/download/?editor=vscode">VS Code</a></li> <li><a href="https://sourcery.ai/download/?editor=pycharm">PyCharm</a></li> </ul> </details> <details> <summary>Review changes via command line</summary> <p>To manually merge these changes, make sure you're on the <code>upgrade_ruff_configuration</code> branch, then run:</p> <pre> git fetch origin sourcery/upgrade_ruff_configuration git merge --ff-only FETCH_HEAD git reset HEAD^ </pre> </details> Help us [improve](https://research.typeform.com/to/j06Spdfr?type=pr_refactor&github_login=Czaki&base_repo=https%3A%2F%2Fgithub.com%2F4DNucleome%2FPartSeg.git&base_remote_ref=refs%2Fpull%2F910%2Fhead&base_ref=upgrade_ruff_configuration&base_sha=8b009c2863e796ab24375001f1061cb6ea2f6844&head_repo=https%3A%2F%2Fgithub.com%2F4DNucleome%2FPartSeg.git&head_ref=sourcery%2Fupgrade_ruff_configuration&base_pr_number=910&base_pr_state=open) this pull request! Co-authored-by: Sourcery AI <>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
No description provided.