From c198760dbbc3d3e9166894cc18d34fcf546d52df Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Wed, 4 Sep 2024 14:38:53 +0200 Subject: [PATCH] fix: Remove `distutils.strtobool` and replace with `BooleanOptionalAction` Co-authored-by: Lev <10231176+levtoji@users.noreply.github.com> --- run-clang-format.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/run-clang-format.py b/run-clang-format.py index 94f1681..b6e85fb 100755 --- a/run-clang-format.py +++ b/run-clang-format.py @@ -23,7 +23,6 @@ import sys import traceback import re -from distutils.util import strtobool from functools import partial @@ -311,7 +310,7 @@ def main(): parser.add_argument( '-i', '--inplace', - type=lambda x: bool(strtobool(x)), + action=argparse.BooleanOptionalAction, default=False, help='Just fix files (`clang-format -i`) instead of returning a diff')