Skip to content

Fix FreeBusy.new() docstring referencing alarm instead of free/busy - #1503

Open
andycheng2018 wants to merge 12 commits into
collective:mainfrom
andycheng2018:fix-freebusy-docstring
Open

Fix FreeBusy.new() docstring referencing alarm instead of free/busy#1503
andycheng2018 wants to merge 12 commits into
collective:mainfrom
andycheng2018:fix-freebusy-docstring

Conversation

@andycheng2018

Copy link
Copy Markdown

Linked issue

Description

The FreeBusy.new() docstring summary was copied from the Alarm class and
incorrectly described creating an alarm. This corrects it to reference the
free/busy component.

I also verified the property required/optional structure for VFREEBUSY against
RFC 5545 §3.6.4, and the implementation already matches the specification, so
only the docstring summary text needed correcting.

This addresses the src/icalendar/cal/free_busy.py item from the checklist in #1473.

Checklist

  • I've added a change log entry to /news, following the instructions in Change log entry format.
  • I've added or updated tests if applicable. (Not applicable: this is a docstring text correction with no behavioral change.)
  • I've run and ensured all tests pass locally.
  • I've added or edited documentation (the corrected docstring renders in the API documentation).

Additional information

AI assistance: Claude Opus 4.5 (Anthropic), used via the web chat interface to
help locate the issue, verify the property structure against RFC 5545, and draft
the docstring correction. I reviewed and validated the change and take
responsibility for it. This is also disclosed in the commit message and the
changelog entry.

The FreeBusy.new() docstring summary was copied from the Alarm class and
incorrectly described creating an alarm. Corrected it to reference the
free/busy component. Verified the property structure against RFC 5545
section 3.6.4; the implementation already matches, only the docstring
text was inaccurate.

AI assistance: Claude Opus 4.5 (Anthropic), used via the web chat
interface to help locate the issue, verify the property structure against
RFC 5545, and draft the docstring correction. I reviewed and validated
the change and take responsibility for it.
@github-actions

Copy link
Copy Markdown
Contributor

Profile summary:

GitHub user: andycheng2018
🟢 No concerns found with user's profile.
🟢 No concerns found with recent PR activity.
🟢 No concerns found with recent issue activity.

For a more detailed report, run `gh-profiler andycheng2018`.
Full profile
GitHub user: andycheng2018
🟢 No concerns found with user's profile.
   🟢 Account age: 3 years
   🟢 Profile information:
        name: Andy Cheng
      Empty fields: company, blog, location, email, bio

🟢 No concerns found with recent PR activity.
   🟢 No PRs opened in the last 21 days.

🟢 No concerns found with recent issue activity.
   🟢 No new issues opened in the last 21 days.

@read-the-docs-community

read-the-docs-community Bot commented Jun 24, 2026

Copy link
Copy Markdown

Comment thread src/icalendar/cal/free_busy.py Outdated

@niccokunzmann niccokunzmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi, please do not use AI for this. Read through the other classes' doc strings and checkhow we name the components and be consistent with that.

…f alarm

Aligns docstring structure with Event.new() convention (summary line +
RFC reference line) while linking directly to RFC 5545 section 3.6.4 for
precision, per review feedback.
@andycheng2018

Copy link
Copy Markdown
Author

Hi, thanks for the feedback. I've made changes based on the grammar/syntax I saw in event.py. Hope the new changes help!

@stevepiercy

Copy link
Copy Markdown
Member

@andycheng2018 please address @niccokunzmann's comment #1503 (review).

stevepiercy
stevepiercy previously approved these changes Jul 20, 2026

@stevepiercy stevepiercy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Docstrings and news are OK, but still needs to address the naming convention issue that @niccokunzmann pointed out.

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 97.927% (+0.01%) from 97.916% — andycheng2018:fix-freebusy-docstring into collective:main

Matches how Event.new() refers to "the event" in its parameter docs.
Also fixed the Raises: line, it was missing the :exc: role.
@andycheng2018

Copy link
Copy Markdown
Author

Hey, thanks for the feedback! I took another look at event.py and updated the docstring so the parameters say "of the free/busy" instead of "of the component" and other parameters to match the two. Let me know if this looks good.

Comment thread src/icalendar/cal/free_busy.py
Comment thread src/icalendar/cal/free_busy.py Outdated
Comment thread src/icalendar/cal/free_busy.py Outdated
Comment thread news/1473.documentation Outdated
andycheng2018 and others added 3 commits July 25, 2026 19:27
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Replaced the RFC-citation sentence with an explicit list of required
properties (UID and DTSTAMP), per stevepiercy's suggestion.

@stevepiercy stevepiercy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One more minor improvement, and then I approve. Thanks for your patience!

Comment thread src/icalendar/cal/free_busy.py Outdated
Per stevepiercy's suggestion, note that UID and DTSTAMP may be set
via the uid and stamp parameters.
@andycheng2018

Copy link
Copy Markdown
Author

No worries, thanks for walking me through this!

@stevepiercy stevepiercy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

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.

4 participants