From 2f4d1bfe805be7cf65aa8b54818d566ccb554466 Mon Sep 17 00:00:00 2001 From: Rafael Sarmiento Date: Mon, 18 May 2020 10:18:19 +0200 Subject: [PATCH 1/2] add noqa to long lines --- reframe/core/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reframe/core/config.py b/reframe/core/config.py index ad1a1a8a50..18af8f09f5 100644 --- a/reframe/core/config.py +++ b/reframe/core/config.py @@ -528,6 +528,9 @@ def handler_list(handler_config): f"by ReFrame based on '{filename}'.\n#\n\n" f"site_configuration = {util.ppretty(converted)}\n") + contents = '\n'.join(l if len(l) < 80 else f'{l} # noqa' + for l in contents.split('\n')) + if newfilename: with open(newfilename, 'w') as fp: if newfilename.endswith('.json'): From 764dd8ff5316b16fd6559ecc945b7f8acb517e54 Mon Sep 17 00:00:00 2001 From: Rafael Sarmiento Date: Mon, 18 May 2020 13:32:02 +0200 Subject: [PATCH 2/2] add error code to the comment --- reframe/core/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reframe/core/config.py b/reframe/core/config.py index 18af8f09f5..50bc6060e2 100644 --- a/reframe/core/config.py +++ b/reframe/core/config.py @@ -528,7 +528,7 @@ def handler_list(handler_config): f"by ReFrame based on '{filename}'.\n#\n\n" f"site_configuration = {util.ppretty(converted)}\n") - contents = '\n'.join(l if len(l) < 80 else f'{l} # noqa' + contents = '\n'.join(l if len(l) < 80 else f'{l} # noqa: E501' for l in contents.split('\n')) if newfilename: