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

feat(kubernetes): improve docstrings for methods #5717

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pedrooot
Copy link
Member

Description

This pull request introduces comprehensive documentation for the KubernetesProvider class in prowler/providers/kubernetes/kubernetes_provider.py. The changes include detailed docstrings for the class, its attributes, and its methods, providing clear descriptions, expected arguments, return values, exceptions, and usage examples.

Documentation Enhancements:

  • Added a class-level docstring to KubernetesProvider, detailing its attributes and methods.
  • Expanded the __init__ method docstring to include exceptions, return values, and usage examples. [1] [2]
  • Enhanced the setup_session method docstring with exceptions.
  • Improved the test_connection method docstring by adding exceptions and usage examples.
  • Updated docstrings for various methods (search_and_save_roles, get_context_user_roles, get_all_namespaces, get_pod_current_namespace, and print_credentials) to include exceptions and usage examples. [1] [2] [3] [4] [5]

Checklist

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@pedrooot pedrooot requested review from a team as code owners November 11, 2024 13:18
@github-actions github-actions bot added the provider/kubernetes Issues/PRs related with the Kubernetes provider label Nov 11, 2024
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.91%. Comparing base (344d541) to head (b6875df).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5717      +/-   ##
==========================================
- Coverage   89.94%   89.91%   -0.03%     
==========================================
  Files        1124     1124              
  Lines       34815    34815              
==========================================
- Hits        31313    31305       -8     
- Misses       3502     3510       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/kubernetes Issues/PRs related with the Kubernetes provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant