Conversation
- Add Google-style docstring to vText class - Document __new__ parameters per style guide - Include RFC 5545 examples - Helps with collective#1118
- Add changelog entry - Closes collective#1118
…ocument-vText Merging changes from main to local repository to keep local up to date.
Pull Request Test Coverage Report for Build 22115328829Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
niccokunzmann
left a comment
There was a problem hiding this comment.
Thanks for your PR! It is good to see such an important class documented :)
|
It is nice to see you work together on a PR! |
|
@NvyGreen On your device, you can run Or online, you can see the error: https://github.com/collective/icalendar/actions/runs/22244471369/job/64355366147?pr=1210#step:5:313 It suggests to change the line. You are right - it should be bytes - but for the test cases, I changed print to show the ical output in a way that can be more easily read. |
stevepiercy
left a comment
There was a problem hiding this comment.
Substantially, this is really good. There's minor syntax issues, and moving the change log where it should go, then it's good to merge. Thank you!
niccokunzmann
left a comment
There was a problem hiding this comment.
The tests fail.
This is the output:
Failed example:
print(event.to_ical())
Expected:
b'BEGIN:VEVENT\r\nSUMMARY:Project XYZ Final Review\\nConference Room - 3B\\nCome Prepared.\r\nEND:VEVENT\r\n'
Got:
BEGIN:VEVENT
SUMMARY:Project XYZ Final Review\nConference Room - 3B\nCome Prepared.
END:VEVENT
I usually just copy the correct lines from the tests into the place where they should be.
|
Yes. I changed the way that print works in the tests. Maybe that should be changed as it is confusing? |
|
Yes. Alternatively, remove the print statement. >>> event.to_ical()
b'BEGIN:VEVENT\r\nSUMMARY:Project XYZ Final Review\\nConference Room - 3B\\nCome Prepared.\r\nEND:VEVENT\r\n' |
|
I opened the issue: #1257 |
Got it, thanks for clarifying. I see the examples are run as doctests, so I believe the expected output would need to be changed to match the test/doctest formatting. To avoid confusion around bytes vs str in Python 3, I can update the example to use |

Documentation for vText class
Description
Added documentation for vText class.
Checklist
CHANGES.rst.Additional information
📚 Documentation preview 📚: https://icalendar--1210.org.readthedocs.build/