Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def create_parser_update(allow_mandatory=True):
    if not allow_mandatory:
        prefix = "--"
        prefix = ""

    parser = argparse.ArgumentParser("web-platform-tests-update",
                                     description="Update script for web-platform-tests tests.")
    parser.add_argument(prefix + "config", action="store", type=abs_path,
                        help="Path to config file")
    parser.add_argument(prefix + "data_root", action="store", type=abs_path,
                        help="Base path for data files")
    parser.add_argument("--rev", action="store", help="Revision to sync to")
    parser.add_argument("--no-check-clean", action="store_true", default=False,
                        help="Don't check the working directory is clean before updating")
    parser.add_argument("--no-sync", dest="sync", action="store_false", default=True,
                        help="Don't resync the tests, just update the expected results")
    parser.add_argument("--update-expected-type", action="store", dest="run_type",
                        choices=["none", "try", "logfile"],
                        default="none", help="Process to use for updating the expectation data")
    #Should make this required iff run=logfile
    parser.add_argument("--run-log", action="append", type=abs_path,
                        help="Log file from run of tests")
    return parser

src/w/p/wptrunner-0.2.5/wptrunner/update.py   wptrunner(Download)
def main():
    parser = wptcommandline.create_parser_update()
    args = parser.parse_args()
    success = run_update(**vars(args))
    sys.exit(0 if success else 1)