Skip to content

Commit f2a630e

Browse files
committed
updated version, added dictkeys iterator to handle_plural
Signed-off-by: Zen <[email protected]>
1 parent 69827c3 commit f2a630e

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "zenlib"
7-
version = "1.1.0"
7+
version = "1.1.1"
88
authors = [
99
{ name="Desultory", email="[email protected]" },
1010
]

src/zenlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.0'
1+
__version__ = '1.1.1'

src/zenlib/util/handle_plural.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__author__ = "desultory"
2-
__version__ = "1.0.0"
2+
__version__ = "1.0.1"
33

4-
from collections.abc import KeysView
4+
from collections.abc import KeysView, ValuesView
55

66

77
def handle_plural(function):
@@ -21,6 +21,10 @@ def wrapper(self, *args):
2121
self.logger.debug("Expanding list: %s" % focus_arg)
2222
for item in focus_arg:
2323
function(self, *(other_args + (item,)))
24+
elif isinstance(focus_arg, ValuesView):
25+
self.logger.debug("Expanding dict values: %s" % focus_arg)
26+
for value in focus_arg:
27+
function(self, *(other_args + (value,)))
2428
elif isinstance(focus_arg, KeysView):
2529
self.logger.debug("Expanding dict keys: %s" % focus_arg)
2630
for key in focus_arg:

0 commit comments

Comments
 (0)