From 988abd6afe3ce8951dab03c9754f5a6d33a84668 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Wed, 13 Jul 2022 04:53:27 -0500 Subject: [PATCH] Skip core ops api in static check (#44284) * skip core ops api in static check, test=document_fix * polish cond, test=document_fix --- tools/print_signatures.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/print_signatures.py b/tools/print_signatures.py index 44083d660c6..f751709a767 100644 --- a/tools/print_signatures.py +++ b/tools/print_signatures.py @@ -292,6 +292,11 @@ def parse_args(): help="using get_all_api or from_modulelist") parser.add_argument('module', type=str, help='module', default='paddle') # not used + parser.add_argument('--skipped', + dest='skipped', + type=str, + help='Skip Checking submodules', + default='paddle.fluid.core_avx.eager.ops') if len(sys.argv) == 1: args = parser.parse_args(['paddle']) @@ -320,6 +325,8 @@ if __name__ == '__main__': all_api_names_to_k[api_name] = k all_api_names_sorted = sorted(all_api_names_to_k.keys()) for api_name in all_api_names_sorted: + if args.skipped != '' and api_name.find(args.skipped) >= 0: + continue api_info = api_info_dict[all_api_names_to_k[api_name]] print("{0} ({2}, ('document', '{1}'))".format( api_name, md5(api_info['docstring']), api_info['signature'] -- GitLab