Improve the default summaries and logic for licenses.
Review Request #14508 — Created July 15, 2025 and submitted
The default summaries for a license are now computed in
LicenseInfo.get_summary()
, and now state information such as the
number of days left in a trial or a grace period. The plan name is no
longer wrapped in parentheses by default, but License Providers can
overrideLicenseInfo.format_plan_name()
to set this however they need.The default summary-building makes use of strings stored in a map, which
helps keep the strings maintainable and avoids a bunch of nested logic.
This is purely internal as a helper.There are a few other small fixes for typos and types, and
LicenseInfo.__repr__()
has been added.
Unit tests pass.
Verified the different states on the Licenses page.
Made use of the summary in the Power Pack work.
- Change Summary:
-
Removed unused imports.
- Commits:
-
Summary ID b2f9b69ba1d63e3021d810792d3d5a2d580b0d6e 4bfb55f84c757823aec1c99295b446153230dcd5 - Diff:
-
Revision 2 (+1168 -112)
Checks run (2 succeeded)
- Change Summary:
-
Corrected a version number in a docstring.
- Commits:
-
Summary ID 4bfb55f84c757823aec1c99295b446153230dcd5 502ac6bf41f3d50a27a2d86866f636e1c19cfd82 - Diff:
-
Revision 3 (+1168 -112)