From 768a51737056d376477372e974b21492a68584bb Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 3 Dec 2025 13:47:54 +0100 Subject: [PATCH] ubuntutools/archive.py: use 'yield from' pylint complains: ``` ubuntutools/archive.py:343:8: R1737: Use 'yield from' directly instead of yielding each element one by one (use-yield-from) ubuntutools/archive.py:346:8: R1737: Use 'yield from' directly instead of yielding each element one by one (use-yield-from) ubuntutools/archive.py:638:8: R1737: Use 'yield from' directly instead of yielding each element one by one (use-yield-from) ``` --- ubuntutools/archive.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ubuntutools/archive.py b/ubuntutools/archive.py index b28afab..1f9dee3 100644 --- a/ubuntutools/archive.py +++ b/ubuntutools/archive.py @@ -340,11 +340,9 @@ class SourcePackage(ABC): def _archive_servers(self): "Generator for mirror and master servers" # Always provide the mirrors first - for server in self.mirrors: - yield server + yield from self.mirrors # Don't repeat servers that are in both mirrors and masters - for server in set(self.masters) - set(self.mirrors): - yield server + yield from set(self.masters) - set(self.mirrors) def _source_urls(self, name): "Generator of sources for name" @@ -635,8 +633,7 @@ class DebianSourcePackage(SourcePackage): def _source_urls(self, name): "Generator of sources for name" - for url in super()._source_urls(name): - yield url + yield from super()._source_urls(name) if name in self.snapshot_files: yield self.snapshot_files[name]