Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ruff: Add and fix N999 #11647

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

Merged
merged 1 commit into from
Apr 1, 2025
Merged

Ruff: Add and fix N999 #11647

merged 1 commit into from
Apr 1, 2025

Conversation

kiblik
Copy link
Contributor

@kiblik kiblik commented Jan 25, 2025

Add rule invalid-module-name (N999) and fix following violations:

dojo/settings/settings.dist.py:1:1: N999 Invalid module name: 'settings.dist'
tests/Import_scanner_test.py:1:1: N999 Invalid module name: 'Import_scanner_test'

This is a bit of radical change as it is renaming a globally used and known setting file. I will be happy for any feedback.

Copy link

dryrunsecurity bot commented Jan 25, 2025

DryRun Security Summary

A patch updates linting configuration by adding a new linter rule and a comment to suppress a specific naming convention warning in two files, with no security issues identified.

Expand for full summary

Summary: A patch modifies linting configuration in two files, adding a new linter rule and a corresponding comment to suppress a specific naming convention warning.

Security Findings:

  • No security vulnerabilities found.

View PR in the DryRun Dashboard.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@kiblik kiblik requested review from Maffooch, mtesauro and cneill and removed request for Maffooch January 28, 2025 15:41
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Maffooch
Copy link
Contributor

@kiblik this one feels a little too radical form my taste. I think we should ignore this rule for now, and revisit in the future, if applicable

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Maffooch
Copy link
Contributor

There is likely a good chance that we do not revisit this one. Renaming settings.dist.py is a big move that would impact docs, historical knowledge, potential automation, etc.

For now, I think just ignoring the rule in the ruff toml would be the best approach forward here

@kiblik
Copy link
Contributor Author

kiblik commented Feb 25, 2025

In that case, I will rename only integration test and set noqa for settings.dist.py

@github-actions github-actions bot added settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR and removed docker docs unittests labels Feb 25, 2025
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Maffooch
Copy link
Contributor

@kiblik I think you suggestion is sound - I missed your last message in my inbox

Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

@mtesauro
Copy link
Contributor

mtesauro commented Apr 1, 2025

@kiblik This one is good to go except for the merge conflicts. 👍

Copy link
Contributor

github-actions bot commented Apr 1, 2025

Conflicts have been resolved. A maintainer will review the pull request shortly.

@mtesauro mtesauro merged commit c5ad754 into DefectDojo:dev Apr 1, 2025
77 checks passed
@kiblik kiblik deleted the ruff_N999 branch April 1, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration_tests lint settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants