]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Apply ruff UP (Pyupgrade) fixes
authorAarni Koskela <akx@iki.fi>
Wed, 18 Jan 2023 19:00:31 +0000 (21:00 +0200)
committerAarni Koskela <akx@iki.fi>
Wed, 18 Jan 2023 19:20:51 +0000 (21:20 +0200)
babel/messages/jslexer.py
pyproject.toml
scripts/import_cldr.py

index 6eab920750a40c405397a660185a454e32c61ac6..d2ffbbe76150fd8fee1dd38845f3b5b67591e276 100644 (file)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
 """
     babel.messages.jslexer
     ~~~~~~~~~~~~~~~~~~~~~~
index 10c1db8b307f938a552fc67a288898ef1a8458d2..dbd137cff7743de8a9cea7e6c4c3485823d23ccd 100644 (file)
@@ -7,7 +7,7 @@ select = [
     "F",
     "I",
     "SIM300",
-    "UP025",
+    "UP",
 ]
 ignore = [
     "C901",  # Complexity
index b5034073eb27d0a9476fd87baa8d385a4356dadc..33e4a60990e943d517fff979f783916bc2fe9ba1 100755 (executable)
@@ -129,7 +129,7 @@ def _time_to_seconds_past_midnight(time_expr):
         return None
     if time_expr.count(":") == 1:
         time_expr += ":00"
-    hour, minute, second = [int(p, 10) for p in time_expr.split(":")]
+    hour, minute, second = (int(p, 10) for p in time_expr.split(":"))
     return hour * 60 * 60 + minute * 60 + second