tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 659f75038e4ee621a57b7cda188c6335fdbf409f
parent 491e058e06f60cf57ec17550ee7388dac76dc3b4
Author: Alex Hochheiden <ahochheiden@mozilla.com>
Date:   Wed, 10 Dec 2025 06:03:27 +0000

Bug 2003412 - Fix PLR5501 warnings: Use elif instead of else with nested if r=emilio,taskgraph-reviewers,ahal

https://docs.astral.sh/ruff/rules/collapsible-else-if/

Differential Revision: https://phabricator.services.mozilla.com/D274704

Diffstat:
Mjs/src/devtools/automation/autospider.py | 5++---
Mtaskcluster/gecko_taskgraph/main.py | 5++---
Mtesting/mozbase/manifestparser/manifestparser/util.py | 21++++++++++-----------
3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/js/src/devtools/automation/autospider.py b/js/src/devtools/automation/autospider.py @@ -317,9 +317,8 @@ if word_bits == 32: sse_flags = "-msse -msse2 -mfpmath=sse" env["CCFLAGS"] = "{} {}".format(env.get("CCFLAGS", ""), sse_flags) env["CXXFLAGS"] = "{} {}".format(env.get("CXXFLAGS", ""), sse_flags) -else: - if platform.system() == "Windows": - CONFIGURE_ARGS += " --target=x86_64-pc-windows-msvc" +elif platform.system() == "Windows": + CONFIGURE_ARGS += " --target=x86_64-pc-windows-msvc" if platform.system() == "Linux" and AUTOMATION: CONFIGURE_ARGS = "--enable-stdcxx-compat " + CONFIGURE_ARGS diff --git a/taskcluster/gecko_taskgraph/main.py b/taskcluster/gecko_taskgraph/main.py @@ -102,10 +102,9 @@ def show_kinds(options): overrides={"target-kinds": target_kinds}, strict=False, ) - else: + elif target_kinds: # Parameters object already exists (from tests) - if target_kinds: - parameters["target-kinds"] = target_kinds + parameters["target-kinds"] = target_kinds tgg = get_taskgraph_generator(options.get("root"), parameters) kind_graph = tgg.kind_graph diff --git a/testing/mozbase/manifestparser/manifestparser/util.py b/testing/mozbase/manifestparser/manifestparser/util.py @@ -39,20 +39,19 @@ if os.sep != "/": else: return path.replace(os.sep, "/") -else: - if os.altsep and os.altsep != "/": +elif os.altsep and os.altsep != "/": - def normsep(path): - if isinstance(path, bytes): - return path.replace(altsep_b, b"/") - else: - return path.replace(os.altsep, "/") - return path + def normsep(path): + if isinstance(path, bytes): + return path.replace(altsep_b, b"/") + else: + return path.replace(os.altsep, "/") + return path - else: +else: - def normsep(path): - return path + def normsep(path): + return path def evaluate_list_from_string(list_string):