mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Manually fix issues that autopep8 introduced
* iam.py 161 -> 160 chars * lamba -> single line function -> multiline function Avoid redefining key iam line length iam.py now clean
This commit is contained in:
committed by
John R Barker
parent
c57a7f05e1
commit
10cd2cd1b7
@@ -121,12 +121,14 @@ def select(predicate, iterable):
|
||||
yield x
|
||||
|
||||
|
||||
def _identity(obj):
|
||||
return obj
|
||||
|
||||
|
||||
class GroupBy(object):
|
||||
# python 2, 3 generic grouping.
|
||||
def __init__(self, iterable, key=None):
|
||||
if key is None:
|
||||
def key(x): return x
|
||||
self.keyfunc = key
|
||||
self.keyfunc = key if key else _identity
|
||||
self.it = iter(iterable)
|
||||
self.tgtkey = self.currkey = self.currvalue = object()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user