mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-11-25 18:09:31 +00:00
refactor: use itertools instead of sum for combining iterables
This commit is contained in:
1 parent
b28c156e78
commit
239149f2b4
7 files changed
+19
-9
No files matched your search
@@ -17,6 +17,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
import itertools
|
||||
|
||||
from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
|
||||
@@ -117,7 +119,7 @@ class KeyringGenerator(PkgbuildGenerator):
|
||||
source_path(Path): destination of the file content
|
||||
"""
|
||||
with source_path.open("w", encoding="utf8") as source_file:
|
||||
for key in sorted(set(self.trusted + self.packagers + self.revoked)):
|
||||
for key in sorted(set(itertools.chain(self.trusted, self.packagers, self.revoked))):
|
||||
public_key = self.sign.key_export(key)
|
||||
source_file.write(public_key)
|
||||
source_file.write("\n")
|
||||
|
||||
Reference in new issue
Block a user