diff options
author | 2024-07-03 15:19:16 +0200 | |
---|---|---|
committer | 2024-07-19 06:41:29 +0100 | |
commit | b65da90fe378b5aff48b0d11db376a26f4ca3c90 (patch) | |
tree | c21464863282095a1b0f15fa6aa9645689508dca /lib | |
parent | ebuild: try to make maintainer mode checks a bit less prone to FP (diff) | |
download | portage-b65da90fe378b5aff48b0d11db376a26f4ca3c90.tar.gz portage-b65da90fe378b5aff48b0d11db376a26f4ca3c90.tar.bz2 portage-b65da90fe378b5aff48b0d11db376a26f4ca3c90.zip |
convert f-strings to normal strings
that do not contain any {}.
detected with ruff
Signed-off-by: Markus Meier <maekke@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1355
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/_emerge/BinpkgFetcher.py | 2 | ||||
-rw-r--r-- | lib/_emerge/BinpkgVerifier.py | 2 | ||||
-rw-r--r-- | lib/portage/gpkg.py | 4 | ||||
-rw-r--r-- | lib/portage/tests/resolver/test_runtime_cycle_merge_order.py | 4 | ||||
-rw-r--r-- | lib/portage/tests/update/test_move_ent.py | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/_emerge/BinpkgFetcher.py b/lib/_emerge/BinpkgFetcher.py index a357bac82..bb6997536 100644 --- a/lib/_emerge/BinpkgFetcher.py +++ b/lib/_emerge/BinpkgFetcher.py @@ -30,7 +30,7 @@ class BinpkgFetcher(CompositeTask): binpkg_path = bintree._remotepkgs[instance_key].get("PATH") if not binpkg_path: raise FileNotFound( - f"PATH not found in the binpkg index, the binhost's portage is probably out of date." + "PATH not found in the binpkg index, the binhost's portage is probably out of date." ) binpkg_format = get_binpkg_format(binpkg_path) diff --git a/lib/_emerge/BinpkgVerifier.py b/lib/_emerge/BinpkgVerifier.py index 7e044c6c4..dd3a70d3a 100644 --- a/lib/_emerge/BinpkgVerifier.py +++ b/lib/_emerge/BinpkgVerifier.py @@ -47,7 +47,7 @@ class BinpkgVerifier(CompositeTask): if bintree.dbapi.cpv_exists(self.pkg.cpv): self.scheduler.output( f"!!! Tried to use non-existent binary for '{self.pkg.cpv}'\n" - + f"!!! Likely caused by an outdated index. Run 'emaint binhost -f'.\n", + + "!!! Likely caused by an outdated index. Run 'emaint binhost -f'.\n", log_path=self.logfile, background=self.background, ) diff --git a/lib/portage/gpkg.py b/lib/portage/gpkg.py index fdb54c69b..06e2283ce 100644 --- a/lib/portage/gpkg.py +++ b/lib/portage/gpkg.py @@ -384,7 +384,7 @@ class tar_stream_reader: try: if self.proc.wait() != os.EX_OK: if not self.killed: - writemsg(colorize("BAD", f"GPKG external program failed.\n")) + writemsg(colorize("BAD", "GPKG external program failed.\n")) raise CompressorOperationFailed("decompression failed") finally: self.proc.stdout.close() @@ -2120,7 +2120,7 @@ class gpkg: return the first one. """ if self.gpkg_version not in (os.path.basename(f) for f in tar.getnames()): - raise InvalidBinaryPackageFormat(f"Invalid gpkg file") + raise InvalidBinaryPackageFormat("Invalid gpkg file") if self.basename and self.prefix and not self.prefix.startswith(self.basename): writemsg( diff --git a/lib/portage/tests/resolver/test_runtime_cycle_merge_order.py b/lib/portage/tests/resolver/test_runtime_cycle_merge_order.py index a695b2519..fb1c52f0e 100644 --- a/lib/portage/tests/resolver/test_runtime_cycle_merge_order.py +++ b/lib/portage/tests/resolver/test_runtime_cycle_merge_order.py @@ -204,8 +204,8 @@ class RuntimeCycleMergeOrderTestCase(TestCase): debug=False, user_config={ "make.conf": ( - f'ACCEPT_KEYWORDS="~x86"', - f'USE="http2"', + 'ACCEPT_KEYWORDS="~x86"', + 'USE="http2"', ), }, ) diff --git a/lib/portage/tests/update/test_move_ent.py b/lib/portage/tests/update/test_move_ent.py index 0b938dd28..99e725e1c 100644 --- a/lib/portage/tests/update/test_move_ent.py +++ b/lib/portage/tests/update/test_move_ent.py @@ -287,7 +287,7 @@ class MoveEntTestCase(TestCase): user_config={ "make.conf": ( f'BINPKG_FORMAT="{binpkg_format}"', - f'FEATURES="binpkg-multi-instance pkgdir-index-trusted"', + 'FEATURES="binpkg-multi-instance pkgdir-index-trusted"', ), }, debug=False, |