Skip to content

Show the hand-written notice in the Enum example - #215

Merged
llucax merged 1 commit into
frequenz-floss:v1.x.xfrom
llucax:enum-example-notice
Oct 26, 2026
Merged

llucax merged 1 commit into
frequenz-floss:v1.x.xfrom
llucax:enum-example-notice

Conversation

@llucax

@llucax llucax commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

The Enum example added in #214 says CANCELLED's notice is written by hand in the member's docstring, but the example had no docstring, so copying it gave a member documented with its runtime warning and a failing strict docs build. It now shows the docstring, and drops since, which nothing reads for a member with a message and no new_name.

The `Enum` example's text says `CANCELLED` gives its own `message`, so
its notice is written by hand as a `Deprecated:` admonition in the
member's docstring, but the example itself had no docstring, so copying
it gave a member that `griffe-frequenz-core` documents with its runtime
warning, with a warning that fails a strict documentation build. It now
shows that docstring, as the deprecations guide's own example does.

`CANCELLED` also drops `since`: with a `message` and no `new_name`
there is no generated notice for it to go into, and the hand-written one
already says the version.

The class docstring now uses single quotes, so the example can hold a
triple-quoted docstring, as `frequenz.core.id`'s module docstring does.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
@llucax
llucax requested a review from a team as a code owner October 26, 2026 11:14
@llucax llucax added this to the v1.6.0 milestone Oct 26, 2026
@llucax llucax added cmd:skip-release-notes It is not necessary to update release notes for this PR part:enum Affects the enum module labels Oct 26, 2026
@llucax
llucax requested review from florian-wagner-frequenz and removed request for a team October 26, 2026 11:14
@llucax
llucax enabled auto-merge October 26, 2026 11:14
@llucax llucax self-assigned this Oct 26, 2026
@llucax
llucax requested a balanced review from Copilot October 26, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@llucax
llucax added this pull request to the merge queue Oct 26, 2026
Merged via the queue into frequenz-floss:v1.x.x with commit 11a5eed Oct 26, 2026
17 checks passed
@llucax
llucax deleted the enum-example-notice branch October 26, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:enum Affects the enum module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants