mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
python: Replace unnecessary intermediate lists with generators.
Mostly suggested by the flake8-comprehension plugin. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
1ded51aa9d
commit
ab120a03bc
@@ -1562,9 +1562,9 @@ class SAMLAuthBackendTest(SocialAuthBase):
|
||||
extra_attrs = ''
|
||||
for extra_attr_name, extra_attr_values in extra_attributes.items():
|
||||
values = ''.join(
|
||||
['<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" ' +
|
||||
'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">' +
|
||||
f'{value}</saml2:AttributeValue>' for value in extra_attr_values]
|
||||
'<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" ' +
|
||||
'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">' +
|
||||
f'{value}</saml2:AttributeValue>' for value in extra_attr_values
|
||||
)
|
||||
extra_attrs += f'<saml2:Attribute Name="{extra_attr_name}" ' + \
|
||||
'NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">' + \
|
||||
|
||||
Reference in New Issue
Block a user