]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
refactor(async-to-sync): rename --convert-all option to --all 787/head
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 12 Apr 2024 22:05:00 +0000 (00:05 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 12 Apr 2024 22:05:41 +0000 (00:05 +0200)
.github/workflows/lint.yml
tools/async_to_sync.py

index 64c42ede02e0dc0d0e78f99df12b448b4329c448..dc15839ad5f0912bc35d441e70d113f8af12c779 100644 (file)
@@ -37,7 +37,7 @@ jobs:
         run: mypy
 
       - name: Check for sync/async inconsistencies
-        run: ./tools/async_to_sync.py --check -B
+        run: ./tools/async_to_sync.py --check --all
 
       - name: Check spelling
         run: codespell
index c748bbe9ca29b7a01fed5048a1dd3eff5af479d9..989181a0840770b28c5400898fd7aed697412a90 100755 (executable)
@@ -85,7 +85,7 @@ def main() -> int:
             PYVER,
         )
 
-    if not opt.convert_all:
+    if not opt.all:
         inputs, outputs = [], []
         for fpin in opt.inputs:
             fpout = fpin.parent / fpin.name.replace("_async", "")
@@ -95,7 +95,7 @@ def main() -> int:
             inputs.append(fpin)
             outputs.append(fpout)
         if not outputs:
-            logger.warning("all output files are up to date, nothing to do")
+            logger.info("all output files are up to date, nothing to do")
             return 0
 
     else:
@@ -561,7 +561,7 @@ def parse_cmdline() -> Namespace:
     )
     parser.add_argument(
         "-B",
-        "--convert-all",
+        "--all",
         action="store_true",
         help="process specified files without checking last modification times",
     )