(file_path)
| 58 | |
| 59 | |
| 60 | def is_file_modified(file_path): |
| 61 | try: |
| 62 | result = subprocess.run( |
| 63 | ["git", "status", "-s", file_path], |
| 64 | stdout=subprocess.PIPE, |
| 65 | stderr=subprocess.PIPE, |
| 66 | text=True |
| 67 | ) |
| 68 | if result.stdout.strip(): |
| 69 | return True |
| 70 | else: |
| 71 | return False |
| 72 | except Exception as e: |
| 73 | print(f"发生错误:{e}") |
| 74 | return False |
| 75 | |
| 76 | |
| 77 | # 检查文件提交时间是否超过指定时间 |
no outgoing calls
no test coverage detected