From 8a9d137dd398430fe0eb667cc7fa275c0f543655 Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Wed, 8 Jan 2025 05:13:11 -0800 Subject: [PATCH] Fixed FURB142 (for-loop-set-mutations): Use of `set.add()` in a for loop --- management/ssl_certificates.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/management/ssl_certificates.py b/management/ssl_certificates.py index f7d481a8..ce72cc6d 100755 --- a/management/ssl_certificates.py +++ b/management/ssl_certificates.py @@ -671,8 +671,7 @@ def get_certificate_domains(cert): try: sans = cert.extensions.get_extension_for_oid(OID_SUBJECT_ALTERNATIVE_NAME).value.get_values_for_type(DNSName) - for san in sans: - names.add(idna_decode_dns_name(san)) + names.update(idna_decode_dns_name(san) for san in sans) except ExtensionNotFound: pass