From 9a32d3c2d455b024e7049d0c803d656dfaea0a2d Mon Sep 17 00:00:00 2001 From: johnny evans Date: Mon, 18 Nov 2024 18:55:28 +0100 Subject: [PATCH] fix --- src/goose_plugins/toolkits/filetype_analyzer.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/goose_plugins/toolkits/filetype_analyzer.py b/src/goose_plugins/toolkits/filetype_analyzer.py index 5cfda58..f22825f 100644 --- a/src/goose_plugins/toolkits/filetype_analyzer.py +++ b/src/goose_plugins/toolkits/filetype_analyzer.py @@ -35,9 +35,7 @@ def analyze_file_types( """ try: analyzer = FileTypeAnalyzer() - result = analyzer.analyze( - project_dir, include_subdirectories, exclude_paths - ) + result = analyzer.analyze(project_dir, include_subdirectories, exclude_paths) if output_file: reporter = ReportGenerator() @@ -76,10 +74,7 @@ def analyze(self, directory, recursive=True, exclude_paths=None): file_counts = {} total_files = 0 - exclude_paths = [ - os.path.abspath(os.path.join(directory, path)) - for path in (exclude_paths or []) - ] + exclude_paths = [os.path.abspath(os.path.join(directory, path)) for path in (exclude_paths or [])] for root, _, files in os.walk(directory): # Skip excluded directories and their subdirectories @@ -102,9 +97,7 @@ def analyze(self, directory, recursive=True, exclude_paths=None): break # Calculate percentages - percentages = { - ext: (count / total_files) * 100 for ext, count in file_counts.items() - } + percentages = {ext: (count / total_files) * 100 for ext, count in file_counts.items()} return { "file_counts": file_counts,