Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Dec 1, 2024
1 parent 0f8df41 commit 83a8c73
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pre-commit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python3
# coding: utf-8

# ytdlbot - pre-commit.py
# for dependabot
import tomllib
import subprocess

with open("pyproject.toml", "rb") as file:
config = tomllib.load(file)


with open("requirements.txt", "w") as file:
for item in config["project"]["dependencies"]:
if " " in item:
item = item.split()[-1]
file.write(f"{item}\n")

# commit with ammend
subprocess.run(["git", "add", "requirements.txt"])
subprocess.run(["git", "commit", "--amend", "--no-edit"])
18 changes: 18 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
git+https://github.com/KurimuzonAkuma/pyrogram@ba49bbff6e37cca6174d0620ef6813960d9d85b6
tgcrypto>=1.2.5
yt-dlp>=2024.11.18
APScheduler>=3.11.0
ffmpeg-python>=0.2.0
PyMySQL>=1.1.1
filetype>=1.2.0
beautifulsoup4>=4.12.3
fakeredis>=2.26.1
redis>=5.2.0
requests>=2.32.3
tqdm>=4.67.1
token-bucket>=0.3.0
python-dotenv>=1.0.1
black>=24.10.0
sqlalchemy>=2.0.36
psutil>=6.1.0
ffpb>=0.4.1

0 comments on commit 83a8c73

Please sign in to comment.