Skip to content

Navigation Menu

Sign in
Sign up

docs: convert docstrings to Google style in parser_tools and component (#1072) - #1749

Open
AhmadBilalDSA wants to merge 20 commits into
collective:main from
AhmadBilalDSA:fix/typing-prop-components
Open

docs: convert docstrings to Google style in parser_tools and component (#1072) #1749
AhmadBilalDSA wants to merge 20 commits into
collective:main from
AhmadBilalDSA:fix/typing-prop-components

Conversation

@AhmadBilalDSA

@AhmadBilalDSA AhmadBilalDSA commented Sep 1, 2026
edited
Loading

Copy link
Copy Markdown

Summary of changes

Converts legacy docstrings in src/icalendar/parser_tools.py and src/icalendar/cal/component.py to Google Python Style with Parameters: and Returns: sections per project documentation guidelines.

See #1072

Checklist

  • I have read the contributing guidelines.
  • I have added tests for my changes (or confirmed existing test suite passes).
  • The pull request targets the main branch.
  • I have updated the documentation where applicable.

@github-actions github-actions Bot added the ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding. label Sep 1, 2026

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This pull request did not pass quality checks and AI use is suspected. Please review Contribute and make any necessary amendments.

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Profile summary:

GitHub user: AhmadBilalDSA
🔴 Significant concerns found with user's profile.
🟡 Some concerns found with recent PR activity.
🟢 No concerns found with recent issue activity.
For a more detailed report, run `gh-profiler AhmadBilalDSA`.
Full profile
GitHub user: AhmadBilalDSA
🔴 Significant concerns found with user's profile.
 🔴 Account age: a month
 🟢 Profile information:
 name: Ahmad Bilal
 location: Pakistan
 email: kierninja@gmail.com
 bio: Data Analyst & Analytics Specialist bridging business intelligence and data engineering. Focused on Python, SQL, DuckDB/Polars, and building automated data work
 linkedin: https://linkedin.com/in/AhmadBilalDES
 Empty fields: company, blog
🟡 Some concerns found with recent PR activity.
 40 PRs opened in the last 21 days.
 9 opened against repos the user owns.
 0 opened against repos in publicly associated orgs.
 31 opened against external repos.
 🟡 7 of 31 external PRs closed without merging in the last 21 days.
🟢 No concerns found with recent issue activity.
 5 new issues opened in the last 21 days.
 3 opened in repos the user owns.
 0 opened in repos in publicly associated orgs.
 2 opened in external repos.
 🟢 0 external issues closed as NOT_PLANNED.
 🟢 0 external issues opened with the same title.

read-the-docs-community Bot commented Sep 1, 2026
edited
Loading

Copy link
Copy Markdown

AhmadBilalDSA added a commit to AhmadBilalDSA/icalendar that referenced this pull request Sep 1, 2026

Copy link
Copy Markdown
Author

Hi @stevepiercy @niccokunzmann,

I have added the changelog entry to resolve the changelog check.

Regarding the bot tag: this PR is strictly scoped to converting docstrings in parser_tools.py and cal/component.py to Google Python Style for #1072, with all tests passing locally via pytest.

Please let me know if you would like any adjustments to the wording or style.

niccokunzmann reacted with thumbs up emoji

@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.

Please revert all section headings of Args back to Parameters. See Docstring structure and the note under Parameters for an explanation. Thank you!

@angatha angatha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a small note: You wrote "Fixes #xxx". That would close the Issue once th PR is merged. Since the issue is (most likely) not done with this, use "See #xxx" instead. That will link the issue but does not close it.

niccokunzmann reacted with thumbs up emoji

coveralls-official Bot commented Sep 3, 2026
edited
Loading

Copy link
Copy Markdown

Coverage Status

coverage: 97.562%. remained the same — AhmadBilalDSA:fix/typing-prop-components into collective:main

AhmadBilalDSA commented Sep 4, 2026
edited
Loading

Copy link
Copy Markdown
Author

Thanks for the feedback @stevepiercy and @angatha Reverted all Args: headings back to Parameters: across parser_tools.py and cal/component.py per the documentation guidelines. Updated the PR description from Fixes #1072 to See #1072. Formatted with ruff to ensure clean CI passing. Verified all unit tests pass locally with pytest."

Copy link
Copy Markdown
Member

@AhmadBilalDSA your edit to the description is worse. Please change it as @angatha directed, and see https://github.com/collective/icalendar/blob/main/.github/pull_request_template.md?plain=1#L14-L35 for instructions.

@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.

@AhmadBilalDSA thanks for your first contribution to icalendar! While reviewing your changes, I found old things that also needed to be addressed that were overlooked. Would you please take care? Thank you!

@@ -0,0 +1 @@
Apply Google Style docstrings to ``parser_tools.py`` and ``cal/component.py``. (#1072)

@stevepiercy stevepiercy Sep 6, 2026

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.

Comment thread src/icalendar/cal/component.py Outdated
Comment thread src/icalendar/cal/component.py Outdated
Comment thread src/icalendar/cal/component.py Outdated
Comment thread src/icalendar/cal/component.py
Comment thread src/icalendar/cal/component.py Outdated
Comment thread src/icalendar/cal/component.py Outdated
Comment thread src/icalendar/parser_tools.py Outdated
Comment thread src/icalendar/parser_tools.py Outdated
Comment thread src/icalendar/parser_tools.py Outdated
AhmadBilalDSA and others added 12 commits September 7, 2026 00:11
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>

Copy link
Copy Markdown
Author

Hi @stevepiercy @angatha,

  1. Updated the PR description to use See #1072.
  2. Renamed the changelog fragment to news/1749.documentation.rst.
  3. Applied all requested docstring grammar and formatting improvements across cal/component.py and parser_tools.py.
  4. Added type hints and docstring updates to Component.walk (name: str | None = None, select: Callable[[Component], bool] = __identity) -> list[Component]) per Add type hints [beginner, Python, typing] #938 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@niccokunzmann niccokunzmann Awaiting requested review from niccokunzmann niccokunzmann is a code owner
@SashankBhamidi SashankBhamidi Awaiting requested review from SashankBhamidi
@angatha angatha Awaiting requested review from angatha angatha is a code owner
@stevepiercy stevepiercy Awaiting requested review from stevepiercy stevepiercy is a code owner

Requested changes must be addressed to merge this pull request.

Labels

ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /