PCLoc
PCLoc copied to clipboard
Bug: --opt_div_matching always evaluates to True
Usage of arg parser for --opt_div_matching
is wrong in the code.
It's a string which always evaluates to True here irrespective of keyword provided, will only evaluate to False if the argument is empty. Rewrite it to something like below code:
parser.add_argument('--my-flag',choices=('True','False'))
arguments = parser.parse_args()
MyFlag = arguments.my_flag == 'True'
instead of
parser.add_argument('--opt_div_matching', default=True, help='True: Divided matching, False: base matching')
if args.opt_div_matching:
refinement = Refinement_extended(superglue)
else:
refinement = Refinement_base(superglue)