Skip to content

Commit

Permalink
Merge branch 'main' into add-all-attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy committed Jul 7, 2024
2 parents 43e5357 + 7fb1567 commit 7977305
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ New features:

Bug fixes:

- ...
- Fix link to stable release of tox in documentation.

6.0.0a0 (2024-06-03)
6.0.0a0 (2024-07-03)
--------------------

Minor changes:
Expand Down
1 change: 1 addition & 0 deletions docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ icalendar contributors
- Bastian Wegge <[email protected]>
- `Steve Piercy <https://github.com/stevepiercy>`_
- Jeffrey Whewhetu <[email protected]>
- `Soham Dutta <https://github.com/NP-compete>`_

Find out who contributed::

Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ To run all tests in all environments, simply run ``tox``
You may not have all Python versions installed or
you may want to run a specific one.
Have a look at the `documentation
<https://tox.wiki/en/latest/example/general.html#selecting-one-or-more-environments-to-run-tests-against>`__.
<https://tox.wiki/en/stable/user_guide.html#cli>`_.
This is how you can run ``tox`` with Python 3.9:

.. code-block:: shell
Expand Down
3 changes: 3 additions & 0 deletions src/icalendar/prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ def __init__(self, c_list):
self.cats = [vText(c) for c in c_list]
self.params = Parameters()

def __iter__(self):
return iter(vCategory.from_ical(self.to_ical()))

def to_ical(self):
return b",".join([c.to_ical() for c in self.cats])

Expand Down
4 changes: 4 additions & 0 deletions src/icalendar/tests/prop/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ def test_prop_vCategory(self):

self.assertEqual(v_cat.to_ical(), b'cat 1,cat 2,cat 3')
self.assertEqual(vCategory.from_ical(v_cat.to_ical()), catz)
c = vCategory(vCategory.from_ical("APPOINTMENT,EDUCATION"))
cats = list(c)
assert cats == ["APPOINTMENT", "EDUCATION"]

def test_prop_TypesFactory(self):
from icalendar.prop import TypesFactory
Expand Down Expand Up @@ -365,3 +368,4 @@ def test_prop_TypesFactory(self):
factory.from_ical('cn', b'Rasmussen\\, Max M\xc3\xb8ller'),
'Rasmussen, Max M\xf8ller'
)

0 comments on commit 7977305

Please sign in to comment.