-
Notifications
You must be signed in to change notification settings - Fork 0
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
🎨 Use constant to define default values #54
Conversation
Reviewer's Guide by SourceryThis pull request refactors the code to use a centralized dictionary, default_config_fields, for defining default values. This change affects the initialization of the class in esxport/click_opt/cli_options.py and the CLI options in esxport/esxport_cli.py. The default_config_fields dictionary is defined in esxport/constant.py. File-Level Changes
Tips
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #54 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 306 318 +12
=========================================
+ Hits 306 318 +12 ☔ View full report in Codecov by Sentry. |
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.
Hey @nikhilbadyal - I've reviewed your changes and found some issues that need to be addressed.
Blocking issues:
- Fix incorrect attribute assignment for client_cert and client_key (link)
Overall Comments:
- Consider further refactoring the
__init__
method to reduce repetition, possibly using a dictionary comprehension or a helper function to set attributes with default values. - The
password
field is handled differently from other fields. Consider adding a comment explaining why, or handle it consistently with other fields if appropriate.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🔴 Security: 1 blocking issue
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
55c54ab
to
8db1577
Compare
Summary by Sourcery
Refactor code to use constants for default values, improving maintainability and consistency across the project.
Enhancements: