From af3feb75eab9c070ccbbdcc73587b57bab0ac4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=84=9D=EC=A7=80=EC=98=81/=EC=B1=85=EC=9E=84=EC=97=B0?= =?UTF-8?q?=EA=B5=AC=EC=9B=90/SW=EA=B3=B5=ED=95=99=28=EC=97=B0=29Open=20So?= =?UTF-8?q?urce=20TP?= Date: Tue, 16 Jun 2026 10:45:46 +0900 Subject: [PATCH 1/4] chore(flake): modify pytest tox issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 석지영/책임연구원/SW공학(연)Open Source TP --- pyproject.toml | 1 - tox.ini | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a37119a..aeb139c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,6 @@ dev = [ "pytest", "pytest-cov", "flake8", - "pytest-flake8", "importlib-metadata", ] diff --git a/tox.ini b/tox.ini index b38e672..1a7cf77 100644 --- a/tox.ini +++ b/tox.ini @@ -35,4 +35,4 @@ commands = changedir = {toxinidir}/tests commands = - pytest -v --flake8 + flake8 From f8fca4c9bd5823c35d86d779f4ccdeab44809b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=84=9D=EC=A7=80=EC=98=81/=EC=B1=85=EC=9E=84=EC=97=B0?= =?UTF-8?q?=EA=B5=AC=EC=9B=90/SW=EA=B3=B5=ED=95=99=28=EC=97=B0=29Open=20So?= =?UTF-8?q?urce=20TP?= Date: Tue, 16 Jun 2026 13:22:00 +0900 Subject: [PATCH 2/4] chore(flake8): fix flake8 error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 석지영/책임연구원/SW공학(연)Open Source TP --- tests/fixtures/scan_project/sample_code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/scan_project/sample_code.py b/tests/fixtures/scan_project/sample_code.py index b502e88..0e6feaf 100644 --- a/tests/fixtures/scan_project/sample_code.py +++ b/tests/fixtures/scan_project/sample_code.py @@ -78,7 +78,7 @@ def main(): type=str, dest='link', default="") parser.add_argument('--formats', '-f', help='Scanner output file format (excel,yaml), Compare mode (excel,html,yaml,json)', - type=str, dest='format',nargs='*', default=[]) + type=str, dest='format', nargs='*', default=[]) parser.add_argument('--output', '-o', help='Output directory or file', type=str, dest='output', default="") parser.add_argument('--dependency', '-d', help='Dependency arguments (e.g. -d "-m pip" )', From 566e633926272e97f8a94e43e76c50d5c8833cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=84=9D=EC=A7=80=EC=98=81/=EC=B1=85=EC=9E=84=EC=97=B0?= =?UTF-8?q?=EA=B5=AC=EC=9B=90/SW=EA=B3=B5=ED=95=99=28=EC=97=B0=29Open=20So?= =?UTF-8?q?urce=20TP?= Date: Tue, 16 Jun 2026 13:33:01 +0900 Subject: [PATCH 3/4] chore(flake8): modify tox.ini MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 석지영/책임연구원/SW공학(연)Open Source TP --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 1a7cf77..b066436 100644 --- a/tox.ini +++ b/tox.ini @@ -32,7 +32,8 @@ commands = [testenv:release] -changedir = {toxinidir}/tests +changedir = {toxinidir} commands = flake8 + pytest From 47f45848a9dbc559265aeb4fa6163f0d096b0cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=84=9D=EC=A7=80=EC=98=81/=EC=B1=85=EC=9E=84=EC=97=B0?= =?UTF-8?q?=EA=B5=AC=EC=9B=90/SW=EA=B3=B5=ED=95=99=28=EC=97=B0=29Open=20So?= =?UTF-8?q?urce=20TP?= Date: Tue, 16 Jun 2026 13:43:31 +0900 Subject: [PATCH 4/4] chore(flake8): fix flake8 error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 석지영/책임연구원/SW공학(연)Open Source TP --- src/fosslight_scanner/cli.py | 2 +- src/fosslight_scanner/common.py | 2 +- src/fosslight_scanner/fosslight_scanner.py | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/fosslight_scanner/cli.py b/src/fosslight_scanner/cli.py index b502e88..0e6feaf 100644 --- a/src/fosslight_scanner/cli.py +++ b/src/fosslight_scanner/cli.py @@ -78,7 +78,7 @@ def main(): type=str, dest='link', default="") parser.add_argument('--formats', '-f', help='Scanner output file format (excel,yaml), Compare mode (excel,html,yaml,json)', - type=str, dest='format',nargs='*', default=[]) + type=str, dest='format', nargs='*', default=[]) parser.add_argument('--output', '-o', help='Output directory or file', type=str, dest='output', default="") parser.add_argument('--dependency', '-d', help='Dependency arguments (e.g. -d "-m pip" )', diff --git a/src/fosslight_scanner/common.py b/src/fosslight_scanner/common.py index 511a48c..1daa1c0 100755 --- a/src/fosslight_scanner/common.py +++ b/src/fosslight_scanner/common.py @@ -112,7 +112,7 @@ def create_scancodejson(all_scan_item_origin, ui_mode_report, src_path=""): all_scan_item = copy.deepcopy(all_scan_item_origin) if all_scan_item.file_items: first_sheet = next((item for item in all_scan_item.file_items if item != FOSSLIGHT_DEPENDENCY), - None) + None) if not first_sheet: first_sheet = FOSSLIGHT_SOURCE all_scan_item.file_items[first_sheet] = [] diff --git a/src/fosslight_scanner/fosslight_scanner.py b/src/fosslight_scanner/fosslight_scanner.py index a4ec1f7..04ed20c 100755 --- a/src/fosslight_scanner/fosslight_scanner.py +++ b/src/fosslight_scanner/fosslight_scanner.py @@ -116,7 +116,7 @@ def run_dependency(path_to_analyze, output_file_with_path, params="", path_to_ex pip_activate_cmd, pip_deactivate_cmd, output_custom_dir, app_name, github_token, formats, True, path_to_exclude=path_to_exclude, - graph_path="", graph_size=(600,600), + graph_path="", graph_size=(600, 600), recursive=recursive_dep, all_exclude_mode=all_exclude_mode ) @@ -160,7 +160,6 @@ def run_scanner(src_path, dep_arguments, output_path, keep_raw_data=False, if not remove_src_data: success, final_excel_dir, result_log = init(output_path) - if not output_files: # If -o does not contains file name, set default name while len(output_files) < len(output_extensions): @@ -363,7 +362,7 @@ def download_source(link, out_dir): def init(output_path="", make_outdir=True): - global _output_dir, _log_file, _start_time, logger + global _output_dir, _start_time, logger result_log = {} output_root_dir = "" @@ -393,7 +392,7 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format correct_mode=True, correct_fpath="", ui_mode=False, path_to_exclude=[], selected_source_scanner="all", source_write_json_file=False, source_print_matched_text=False, source_time_out=120, binary_simple=False, recursive_dep=False): - global _executed_path, _start_time + global _executed_path output_files = [] default_oss_name = "" @@ -438,7 +437,7 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format logger.warning(f"(-p option) Cannot analyze with multiple path: {path_arg}") success, msg, output_path, output_files, output_extensions, formats = check_output_formats_v2(output_file_or_dir, file_format, - CUSTOMIZED_FORMAT) + CUSTOMIZED_FORMAT) if output_path == "": output_path = _executed_path else: @@ -505,8 +504,8 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format output_extensions, num_cores, db_url, default_oss_name, default_oss_version, url_to_analyze, correct_mode, correct_fpath, ui_mode, path_to_exclude, - selected_source_scanner, source_write_json_file, source_print_matched_text, source_time_out, - binary_simple, formats, recursive_dep) + selected_source_scanner, source_write_json_file, source_print_matched_text, + source_time_out, binary_simple, formats, recursive_dep) if extract_folder: shutil.rmtree(extract_folder)