Skip to content

Use lazy definitions for config values #504

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

Conversation

nathanjmcdougall
Copy link
Owner

No description provided.

@nathanjmcdougall nathanjmcdougall linked an issue Apr 7, 2025 that may be closed by this pull request
Copy link

codspeed-hq bot commented Apr 7, 2025

CodSpeed Performance Report

Merging #504 will not alter performance

Comparing 500-get-performance-improvement-for-dynamic-configuration (2a13b92) with main (b7fbc12)

Summary

✅ 1 untouched benchmarks

Copy link

codecov bot commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.49%. Comparing base (b7fbc12) to head (2a13b92).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #504   +/-   ##
=======================================
  Coverage   97.49%   97.49%           
=======================================
  Files          83       83           
  Lines        3873     3878    +5     
=======================================
+ Hits         3776     3781    +5     
  Misses         97       97           

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

@nathanjmcdougall nathanjmcdougall requested a review from Copilot April 7, 2025 22:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/usethis/_tool.py:1026

  • This ConfigEntry does not provide a get_value function and will use the default _get_no_config_value, which may not be intended. Verify if lazy initialization should be applied here or if a specific get_value should be provided.
keys=["tool", "pyproject-fmt"]

src/usethis/_tool.py:743

  • [nitpick] Consider refactoring repetitive inline lambda expressions that return constant values into a shared helper function to improve maintainability.
get_value=lambda: exclude_also,

@nathanjmcdougall nathanjmcdougall merged commit c753fba into main Apr 7, 2025
17 checks passed
@nathanjmcdougall nathanjmcdougall deleted the 500-get-performance-improvement-for-dynamic-configuration branch April 7, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get performance improvement for dynamic configuration
1 participant