Repository navigation
Conversation
|
Thanks for the pull request, @brenolois! A maintainer will review it shortly. |
|
Hey, just a quick heads-up: all the code changes and tests for this PR are passing perfectly, but the CI is failing on the Documentation and Read the Docs steps because of an unrelated issue. It looks like |
|
@brenolois thanks. Would you give #2092 a review? |
|
Thanks @stevepiercy! I saw that #2092 is already merged and the fix looks great. I just updated my branch here with the latest main and all checks have successfully passed now. |
| @@ -0,0 +1,4 @@ | |||
| Improved the :class:`~icalendar.prop.cal_address.vCalAddress` interface with | |||
There was a problem hiding this comment.
This thouls be a single line and at least you must add your github handle. Have your read our AI policy too?
angatha
left a comment
There was a problem hiding this comment.
LGTM but @niccokunzmann please look inthe one one thread where I tagged you and maybe you can explain why the changes from #2057 aren't in main
| email = self.EMAIL | ||
| if email is not None: | ||
| return self._remove_mailto(email) | ||
| return self.address |
|
|
||
| @email.setter | ||
| def email(self, value: str | None) -> None: | ||
| """Set or remove the RFC 7986 ``EMAIL`` parameter.""" |
There was a problem hiding this comment.
This could be improved by explaining, when the parameter is removed and how the 'mailto:' prefix is handled.
| """Remove the RFC 7986 ``EMAIL`` parameter.""" | ||
| del self.EMAIL | ||
|
|
||
| def has_email(self, email: str) -> bool: |
There was a problem hiding this comment.
Thank you for doing this. I'm a bit confused, why it is not present in main, since #2057 already did it and is marked as merged.
…mail (#1916)
Linked issue
Description
This PR implements the remaining
vCalAddressinterface improvements requested in #1916:addressproperty: Moved the logic that strips themailto:prefix from the oldemailproperty into this newaddressproperty.emailproperty: Updated the getter to return the RFC 7986EMAILparameter if present (falling back toaddress). The setter now strips themailto:prefix (case-insensitive) and sets theEMAILparameter. Added a deleter as well.has_emailmethod: Addedhas_email(email) -> boolto perform case-insensitive comparisons, strippingmailto:prefixes, and checking against both theEMAILparameter and theaddress.uri,address,email, andEMAILto clarify the exact differences and usage scenarios based on RFC 7986 Section 6.2.test_vCalAddress.pycovering all new paths.Checklist
Additional information