🛠️ Isort isn't used anymore due to conflicts with black. Black reformatting done. Pre-Commit-Hook version upgrades.

This commit is contained in:
Robert Honz
2024-01-12 11:12:47 +01:00
parent 8a46e96921
commit 87091fb060
4 changed files with 21 additions and 14 deletions
+16 -10
View File
@@ -5,7 +5,7 @@ default_stages: [commit, push]
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0" rev: "v4.5.0"
hooks: hooks:
- id: check-case-conflict - id: check-case-conflict
- id: check-merge-conflict - id: check-merge-conflict
@@ -15,17 +15,17 @@ repos:
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit - repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.230" rev: "v0.1.12"
hooks: hooks:
- id: ruff - id: ruff
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3" rev: "v3.1.0"
hooks: hooks:
- id: prettier - id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0 rev: v4.5.0
hooks: hooks:
- id: check-yaml - id: check-yaml
- id: end-of-file-fixer - id: end-of-file-fixer
@@ -40,13 +40,19 @@ repos:
# types: [python] # types: [python]
# language: system # language: system
- repo: local - repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks: hooks:
- id: isort - id: seed-isort-config
name: isort
entry: poetry run isort --settings-path pyproject.toml # Disabled du to conflicts with black and I like the style of black more.
types: [python] # - repo: local
language: system # hooks:
# - id: isort
# name: isort
# entry: poetry run isort --settings-path pyproject.toml
# types: [python]
# language: system
- repo: local - repo: local
hooks: hooks:
+3
View File
@@ -165,6 +165,9 @@ profile = "black"
multi_line_output = 3 multi_line_output = 3
indent = 4 indent = 4
color_output = true color_output = true
known_third_party = ["Crypto", "PySide6", "coloredlogs", "constants", "dataclasses_json", "ffmpeg", "m3u8", "mutagen", "pathvalidate", "requests", "rich", "tidalapi", "typer"]
[tool.mypy] [tool.mypy]
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file # https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
+1 -2
View File
@@ -1,7 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
from typing import Annotated, Optional
from pathlib import Path from pathlib import Path
from typing import Annotated, Optional
import typer import typer
from rich.live import Live from rich.live import Live
+1 -2
View File
@@ -1,7 +1,6 @@
from typing import Any
from collections.abc import Callable from collections.abc import Callable
from json import JSONDecodeError from json import JSONDecodeError
from typing import Any
import tidalapi import tidalapi
from requests import HTTPError from requests import HTTPError