Ejemplo n.º 1
0
 def _inverse_arg(self, arg):
   if arg.startswith('--'):
     if arg.startswith('--no-'):
       raise BooleanOptionNameWithNo(self.scope, arg)
     return '--no-{}'.format(arg[2:])
   else:
     return None
Ejemplo n.º 2
0
 def _inverse_arg(self, arg: str) -> Optional[str]:
     if not arg.startswith("--"):
         return None
     if arg.startswith("--no-"):
         raise BooleanOptionNameWithNo(self.scope, arg)
     return f"--no-{arg[2:]}"