mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 23:48:54 +00:00
module utils: update code to python3 (#10907)
* module utils: update code to python3 * add changelog frag
This commit is contained in:
parent
ce544f370c
commit
cc83188594
9 changed files with 83 additions and 77 deletions
|
|
@ -11,7 +11,7 @@ import re
|
|||
|
||||
def _create_regex_group_complement(s):
|
||||
lines = (line.strip() for line in s.split("\n") if line.strip())
|
||||
chars = filter(None, (line.split("#")[0].strip() for line in lines))
|
||||
chars = [_f for _f in (line.split("#")[0].strip() for line in lines) if _f]
|
||||
group = rf"[^{''.join(chars)}]"
|
||||
return re.compile(group)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue