-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
chore(global_provider): Move methods to class as static #3896
Conversation
You can check the documentation for this PR here -> SaaS Documentation |
prowler/providers/common/models.py
Outdated
@@ -38,8 +38,8 @@ def __init__(self, arguments, bulk_checks_metadata): | |||
self.fixer = getattr(arguments, "fixer", None) | |||
|
|||
# Shodan API Key | |||
if arguments.shodan: | |||
update_provider_config("shodan_api_key", arguments.shodan) | |||
# if arguments.shodan: |
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.
Review this before merge.
@@ -96,19 +95,6 @@ def check_current_version(): | |||
return f"{prowler_version_string}" | |||
|
|||
|
|||
# TODO: revisit this function |
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.
We cannot remove this function, it needs to be moved elsewhere.
You can check the documentation for this PR here -> SaaS Documentation |
You can check the documentation for this PR here -> SaaS Documentation |
You can check the documentation for this PR here -> SaaS Documentation |
You can check the documentation for this PR here -> SaaS Documentation |
You can check the documentation for this PR here -> SaaS Documentation |
You can check the documentation for this PR here -> SaaS Documentation |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3896 +/- ##
==========================================
- Coverage 86.65% 86.59% -0.07%
==========================================
Files 777 776 -1
Lines 24139 24146 +7
==========================================
- Hits 20918 20909 -9
- Misses 3221 3237 +16 ☔ View full report in Codecov by Sentry. |
You can check the documentation for this PR here -> SaaS Documentation |
You can check the documentation for this PR here -> SaaS Documentation |
…-provider-in-class
You can check the documentation for this PR here -> SaaS Documentation |
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.
Thanks for your work! @jfagoagas 🥇
You can check the documentation for this PR here -> SaaS Documentation |
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.
🔝
Description
Improve code organisation making the
set_global_provider
andget_global_provider
@staticmethod
. This implies renaming a lot of code, which is already done and removes a file.License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.