Used isort to sort imports. Also added to the git pre-commit hook.
[python_utils.git] / argparse_utils.py
index 8c254ae1f995f6aa684134c595e35968ea5b36cd..5a270f6ef22c1845be1bd6c59ab7fde1cb4cfe21 100644 (file)
@@ -8,7 +8,6 @@ from typing import Any
 
 from overrides import overrides
 
-
 # This module is commonly used by others in here and should avoid
 # taking any unnecessary dependencies back on them.
 
@@ -16,9 +15,7 @@ logger = logging.getLogger(__name__)
 
 
 class ActionNoYes(argparse.Action):
-    def __init__(
-        self, option_strings, dest, default=None, required=False, help=None
-    ):
+    def __init__(self, option_strings, dest, default=None, required=False, help=None):
         if default is None:
             msg = 'You must provide a default with Yes/No action'
             logger.critical(msg)
@@ -47,9 +44,7 @@ class ActionNoYes(argparse.Action):
 
     @overrides
     def __call__(self, parser, namespace, values, option_strings=None):
-        if option_strings.startswith('--no-') or option_strings.startswith(
-            '--no_'
-        ):
+        if option_strings.startswith('--no-') or option_strings.startswith('--no_'):
             setattr(namespace, self.dest, False)
         else:
             setattr(namespace, self.dest, True)