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

Added get_type_hints cache; documentation updates #61

Merged
merged 3 commits into from
Apr 21, 2024
Merged

Added get_type_hints cache; documentation updates #61

merged 3 commits into from
Apr 21, 2024

Conversation

dskrypa
Copy link
Owner

@dskrypa dskrypa commented Apr 21, 2024

  • Added lru_cache for get_type_hints for type annotation detection since get_type_hints returns a dict of {attr_name: annotation} for all attributes in the given class, and re-builds that dict each time it is called. Since multiple attributes are examined in each class that extends Command, caching the result improves performance for that step.
  • Updated docs to include info about AsyncCommand
  • Updated docs to suggest using UsageError and BadArgument when manually validating user input

@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.43%. Comparing base (aa3da9d) to head (7de4769).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #61   +/-   ##
=======================================
  Coverage   98.43%   98.43%           
=======================================
  Files          49       49           
  Lines        6628     6630    +2     
  Branches     1396     1396           
=======================================
+ Hits         6524     6526    +2     
  Misses         95       95           
  Partials        9        9           
Flag Coverage Δ
unittests 98.43% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@dskrypa dskrypa merged commit c27662f into main Apr 21, 2024
5 checks passed
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.

2 participants