Get year of latest commit given file
(file)
| 92 | |
| 93 | |
| 94 | def get_latest_commit_year(file): |
| 95 | """ |
| 96 | Get year of latest commit given file |
| 97 | """ |
| 98 | date_str = run(f"git log -1 --format=%cd --date=short {file}", |
| 99 | cwd=get_top()) |
| 100 | return datetime.datetime.strptime(date_str, '%Y-%m-%d').year |
no test coverage detected