tor-browser

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

commit 866d02765cd02d18d5ea503bf5afa65ad9137b95
parent 4a9f170334087cc93613eb21f8875257909f38f4
Author: Alex Hochheiden <ahochheiden@mozilla.com>
Date:   Wed, 10 Dec 2025 06:03:24 +0000

Bug 2003412 - Fix PLR1730 warnings: Replace if statement with min()/max() call r=emilio,perftest-reviewers,sparky

https://docs.astral.sh/ruff/rules/if-stmt-min-max/

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

Diffstat:
Mtesting/talos/talos/heavy.py | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/testing/talos/talos/heavy.py b/testing/talos/talos/heavy.py @@ -66,13 +66,12 @@ def follow_redirects(url, max=3): def _recursive_mtime(path): - max = os.path.getmtime(path) + max_mtime = os.path.getmtime(path) for root, dirs, files in os.walk(path): for element in dirs + files: age = os.path.getmtime(os.path.join(root, element)) - if age > max: - max = age - return max + max_mtime = max(max_mtime, age) + return max_mtime def profile_age(profile_dir, last_modified=None):