import ast
from typing import Dict, List, Any
def scan_english_code(file_path: str) -> Dict[str, Any]:
"""Scan a Python file and extract class information and functions."""
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
return content
def main():
import sys
import os
#
# if len(sys.argv) != 2:
# print("Usage: python scan_english_code.py <target_directory>")
# return
# target_dir = sys.argv[1]
target_dir = "E:/pyspark_check/check_fang_fa"
text=''
for root, _, files in os.walk(target_dir):
for file in files:
if file.endswith('.py'):
file_path = os.path.join(root, file)
result = scan_english_code(file_path)
text+=f"File: {
file_path}"
text+="-" * 50
text+=result
text+="\n" + "-" * 50
使用deep seek r1 自动写代码
最新推荐文章于 2025-03-04 16:54:06 发布