Улучшенный просчет строк

This commit is contained in:
sergey
2025-02-11 00:01:12 +07:00
parent c8805eba26
commit 4cbbdf021a

View File

@@ -16,7 +16,7 @@ def count_lines_in_python_files(directory):
# Проходим по всем директориям и файлам в заданной директории # Проходим по всем директориям и файлам в заданной директории
for root, dirs, files in os.walk(directory): for root, dirs, files in os.walk(directory):
# Исключаем определенные директории # Исключаем определенные директории
if any(excluded in root for excluded in ['.venv', '.git', '.idea', '__pycache__']): if any(excluded in root for excluded in ['.venv', '.env', '.git', '.idea', '__pycache__']):
continue continue
for file in files: for file in files: