diff --git a/run-clang-format.py b/run-clang-format.py index b6e85fb..94f1681 100755 --- a/run-clang-format.py +++ b/run-clang-format.py @@ -23,6 +23,7 @@ import sys import traceback import re +from distutils.util import strtobool from functools import partial @@ -310,7 +311,7 @@ def main(): parser.add_argument( '-i', '--inplace', - action=argparse.BooleanOptionalAction, + type=lambda x: bool(strtobool(x)), default=False, help='Just fix files (`clang-format -i`) instead of returning a diff')