Skip to content

Commit

Permalink
style: replace black with ruff-format
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Feb 16, 2025
1 parent 244257c commit 7aedffe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
python-version: "3.x"

- run: pip install -e '.[dev]'
- run: pip install pre-commit

- uses: trim21/actions/pre-commit@master

Expand Down
8 changes: 3 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ repos:
rev: v0.23
hooks:
- id: validate-pyproject
language: python
additional_dependencies: ["validate-pyproject-schema-store[all]==2025.2.10"]

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
Expand Down Expand Up @@ -36,8 +38,4 @@ repos:
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
- id: ruff-format
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ Homepage = 'https://github.com/Trim21/transmission-rpc'

[project.optional-dependencies]
dev = [
# lint
'pre-commit==4.1.0; python_version >= "3.9"',
# tests
'yarl~=1.3',
'pytest==8.3.3',
'pytest-github-actions-annotate-failures==0.3.0',
'coverage~=7.6',
# types
'mypy==1.13.0',
'mypy==1.13.0; python_version >= "3.10"',
# docs
'sphinx>=8,<=8.1.3; python_version >= "3.10"',
'furo==2024.8.6; python_version >= "3.10"',
Expand Down Expand Up @@ -150,5 +148,5 @@ ignore = [
'PLR0915',
'PLR2004',
'PGH003',
'TCH002',
'TC002',
]
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_client_parse_url(protocol: Literal["http", "https"], username, password
path=path,
)

assert client._url == f'{protocol}://{host}:{port}{urljoin(path, "rpc")}' # noqa: SLF001
assert client._url == f"{protocol}://{host}:{port}{urljoin(path, 'rpc')}" # noqa: SLF001


def hash_to_magnet(h):
Expand Down

0 comments on commit 7aedffe

Please sign in to comment.