mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-08 13:07:19 +00:00
[PR #11342/266d9d3f backport][stable-12] batch 2 - update Python idiom to 3.7 using pyupgrade (#11345)
batch 2 - update Python idiom to 3.7 using pyupgrade (#11342)
* batch 2 - update Python idiom to 3.7 using pyupgrade
* Apply suggestions from code review
(cherry picked from commit 266d9d3fb0)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
213dc22217
commit
303bac630a
19 changed files with 64 additions and 70 deletions
|
|
@ -139,7 +139,7 @@ def test_make_unsafe_dict_key():
|
|||
|
||||
|
||||
def test_make_unsafe_set():
|
||||
value = set([_make_trusted("test")])
|
||||
value = {_make_trusted("test")}
|
||||
if not SUPPORTS_DATA_TAGGING:
|
||||
value.add(_make_trusted(b"test"))
|
||||
unsafe_value = make_unsafe(value)
|
||||
|
|
@ -147,7 +147,7 @@ def test_make_unsafe_set():
|
|||
for obj in unsafe_value:
|
||||
assert _is_trusted(obj)
|
||||
|
||||
value = set([_make_trusted("{{test}}")])
|
||||
value = {_make_trusted("{{test}}")}
|
||||
if not SUPPORTS_DATA_TAGGING:
|
||||
value.add(_make_trusted(b"{{test}}"))
|
||||
unsafe_value = make_unsafe(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue