#NEWLINE# def __init__( self , option_strings , dest , default = None , required = False , help = None , metavar = None , positive_prefixes = [ '--' ] , negative_prefixes = [ '--no-' ] ) : #NEWLINE# #INDENT# self . positive_strings = set ( ) #NEWLINE# self . negative_strings = set ( ) #NEWLINE# for string in option_strings : #NEWLINE# #INDENT# assert re . match ( '--[A-z]+' , string ) #NEWLINE# suffix = string [ 2 : ] #NEWLINE# for positive_prefix in positive_prefixes : #NEWLINE# #INDENT# self . positive_strings . add ( ( positive_prefix + suffix ) ) #NEWLINE# #UNINDENT# for negative_prefix in negative_prefixes : #NEWLINE# #INDENT# self . negative_strings . add ( ( negative_prefix + suffix ) ) #NEWLINE# #UNINDENT# #UNINDENT# strings = list ( ( self . positive_strings | self . negative_strings ) ) #NEWLINE# super ( FlagAction , self ) . __init__ ( option_strings = strings , dest = dest , nargs = 0 , const = None , default = default , type = bool , choices = None , required = required , help = strings , metavar = metavar )