Skip to content

Commit 8a324a7

Browse files
committed
Add [project] to pyproject.toml; add pre-commit
1 parent ea48981 commit 8a324a7

File tree

5 files changed

+3849
-1
lines changed

5 files changed

+3849
-1
lines changed

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- repo: https://github.com/charliermarsh/ruff-pre-commit
10+
rev: v0.8.3
11+
hooks:
12+
- id: ruff
13+
- id: ruff-format
14+
- repo: local
15+
hooks:
16+
- id: pytest
17+
name: pytest
18+
entry: uv run pytest ./tests -sx
19+
language: system
20+
types: [python]
21+
pass_filenames: false
22+
always_run: true

pyproject.toml

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
1+
[project]
2+
name = "streamrip"
3+
version = "2.1.0"
4+
description = "A fast, all-in-one music downloader for Qobuz, Deezer, Tidal, and SoundCloud"
5+
authors = [
6+
{name = "nathom", email = "[email protected]"}
7+
]
8+
license = {text = "GPL-3.0-only"}
9+
readme = "README.md"
10+
keywords = ["hi-res", "free", "music", "download"]
11+
classifiers = [
12+
"License :: OSI Approved :: GNU General Public License (GPL)",
13+
"Operating System :: OS Independent",
14+
]
15+
requires-python = ">=3.10"
16+
dependencies = [
17+
"mutagen>=1.45.1",
18+
"tomlkit>=0.7.2",
19+
"pathvalidate>=2.4.1",
20+
"simple-term-menu>=1.2.1; sys_platform != 'win32'",
21+
"pick>=2; sys_platform == 'win32'",
22+
"windows-curses>=2.2.0; sys_platform == 'win32'",
23+
"Pillow>=9,<11",
24+
"deezer-py==1.3.6",
25+
"pycryptodomex>=3.10.1",
26+
"appdirs>=1.4.4",
27+
"m3u8>=0.9.0",
28+
"aiofiles>=0.7",
29+
"aiohttp>=3.9",
30+
"aiodns>=3.0.0",
31+
"aiolimiter>=1.1.0",
32+
"pytest-mock>=3.11.1",
33+
"pytest-asyncio>=0.21.1",
34+
"rich>=13.6.0",
35+
"click-help-colors>=0.9.2",
36+
]
37+
38+
[project.optional-dependencies]
39+
ssl = ["certifi>=2025.1.31"]
40+
dev = [
41+
"types-click>=7.1.2",
42+
"types-Pillow>=8.3.1",
43+
"ruff>=0.1",
44+
"black>=24",
45+
"isort>=5.9.3",
46+
"flake8>=3.9.2",
47+
"setuptools>=67.4.0",
48+
"pytest>=7.4",
49+
"pre-commit>=4.2.0",
50+
]
51+
52+
[project.urls]
53+
Homepage = "https://github.com/nathom/streamrip"
54+
Repository = "https://github.com/nathom/streamrip"
55+
"Bug Reports" = "https://github.com/nathom/streamrip/issues"
56+
57+
[project.scripts]
58+
rip = "streamrip.rip:rip"
59+
160
[tool.poetry]
261
name = "streamrip"
362
version = "2.1.0"
@@ -68,7 +127,19 @@ build-backend = "poetry.core.masonry.api"
68127

69128
[tool.ruff.lint]
70129
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
71-
select = ["E4", "E7", "E9", "F", "I", "ASYNC", "N", "RUF", "ERA001"]
130+
select = [
131+
"E4",
132+
"E7",
133+
"E9",
134+
"F",
135+
"I",
136+
"ASYNC",
137+
"N",
138+
"RUF",
139+
"ERA001",
140+
"SIM117", # https://docs.astral.sh/ruff/rules/multiple-with-statements/
141+
"PT006" # https://docs.astral.sh/ruff/rules/pytest-parametrize-names-wrong-type/
142+
]
72143
ignore = []
73144

74145
# Allow fix for all enabled rules (when `--fix`) is provided.

0 commit comments

Comments
 (0)