Skip to content

docs: convert timezone.py docstrings to Google style#1387

Open
Godzilaa wants to merge 1 commit into
collective:mainfrom
Godzilaa:fix/google-style-docstrings-timezone
Open

docs: convert timezone.py docstrings to Google style#1387
Godzilaa wants to merge 1 commit into
collective:mainfrom
Godzilaa:fix/google-style-docstrings-timezone

Conversation

@Godzilaa
Copy link
Copy Markdown

Convert old :param/:raises Sphinx-style docstrings in timezone.py
to Google-style docstrings matching the project style guide.

Functions updated:

  • _extract_offsets
  • _make_unique_tzname
  • to_tz
  • from_tzinfo
  • from_tzid

Contributes to #1072

@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 icalendar | 🛠️ Build #32693848 | 📁 Comparing a55c5ac against latest (66fb3e1)

  🔍 Preview build  

3 files changed
± 404.html
± reference/api/icalendar.cal.timezone.html
± _modules/icalendar/cal/timezone.html

@stevepiercy
Copy link
Copy Markdown
Member

@Godzilaa would you please add a change log entry per https://icalendar.readthedocs.io/en/stable/contribute/index.html#change-log-entry-format, and update your branch with main?

Copy link
Copy Markdown
Member

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I found a few issues with the original docstrings during my review, as well as a few minor suggestions and corrections. Would you please take care to address them? Thank you!

Comment thread src/icalendar/cal/timezone.py
Comment thread src/icalendar/cal/timezone.py Outdated
Comment thread src/icalendar/cal/timezone.py
Comment thread src/icalendar/cal/timezone.py Outdated
Comment thread src/icalendar/cal/timezone.py
Comment thread src/icalendar/cal/timezone.py Outdated
Convert old :param/:raises Sphinx-style docstrings in timezone.py
to Google-style docstrings matching the project style guide.

Functions updated:
- _extract_offsets
- _make_unique_tzname
- to_tz
- from_tzinfo
- from_tzid

Contributes to collective#1072

Used AI model: opencode/deepseek-v4-flash-free
Used for: converting Sphinx-style docstrings to Google-style,
fixing duplicate parameter in from_tzid, adding changelog entry,
and fixing line length formatting.
@Godzilaa Godzilaa force-pushed the fix/google-style-docstrings-timezone branch from 20ceb7d to 4385d4c Compare May 21, 2026 11:14
@Godzilaa
Copy link
Copy Markdown
Author

I've rebased the branch on latest main, added a changelog entry (news/1072.documentation), fixed the duplicate first_date parameter in from_tzid, and ensured all ruff checks pass. All 14,751 tests succeed.

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