mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
style: format update-history.py with black
This commit is contained in:
parent
8592fad9cd
commit
8a598eacaf
1 changed files with 8 additions and 5 deletions
|
@ -4,17 +4,19 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
|
||||||
def run_git_log():
|
def run_git_log():
|
||||||
cmd = ["git", "log", "-p", "v0.64.0..HEAD", "--", "aider/", ":!aider/website/", ":!HISTORY.md"]
|
cmd = ["git", "log", "-p", "v0.64.0..HEAD", "--", "aider/", ":!aider/website/", ":!HISTORY.md"]
|
||||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||||
return result.stdout
|
return result.stdout
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# Get the git log output
|
# Get the git log output
|
||||||
diff_content = run_git_log()
|
diff_content = run_git_log()
|
||||||
|
|
||||||
# Save to temporary file
|
# Save to temporary file
|
||||||
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.diff') as tmp:
|
with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".diff") as tmp:
|
||||||
tmp.write(diff_content)
|
tmp.write(diff_content)
|
||||||
tmp_path = tmp.name
|
tmp_path = tmp.name
|
||||||
|
|
||||||
|
@ -32,5 +34,6 @@ def main():
|
||||||
# Cleanup
|
# Cleanup
|
||||||
os.unlink(tmp_path)
|
os.unlink(tmp_path)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue