From 819621324753265fcc8ac274a306978227b41813 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Fri, 12 Jan 2024 10:47:17 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Isort=20refactoring.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 72 +++++++++++++++++------------------ tidal_dl_ng/cli.py | 3 +- tidal_dl_ng/config.py | 3 +- tidal_dl_ng/model/gui_data.py | 1 - 4 files changed, 40 insertions(+), 39 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 904ede1..9316f3d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,48 +4,48 @@ default_language_version: default_stages: [commit, push] repos: -# - repo: https://github.com/pre-commit/pre-commit-hooks -# rev: "v4.4.0" -# hooks: -# - id: check-case-conflict -# - id: check-merge-conflict -# - id: check-toml -# - id: check-yaml -# - id: end-of-file-fixer -# - id: trailing-whitespace + # - repo: https://github.com/pre-commit/pre-commit-hooks + # rev: "v4.4.0" + # hooks: + # - id: check-case-conflict + # - id: check-merge-conflict + # - id: check-toml + # - id: check-yaml + # - id: end-of-file-fixer + # - id: trailing-whitespace - repo: https://github.com/charliermarsh/ruff-pre-commit rev: "v0.0.230" hooks: - id: ruff -# - repo: https://github.com/pre-commit/mirrors-prettier -# rev: "v3.0.3" -# hooks: -# - id: prettier -# -# - repo: https://github.com/pre-commit/pre-commit-hooks -# rev: v2.5.0 -# hooks: -# - id: check-yaml -# - id: end-of-file-fixer -# exclude: LICENSE -# -# - repo: local -# hooks: -# - id: pyupgrade -# name: pyupgrade -# entry: poetry run pyupgrade --py310-plus -# types: [python] -# language: system -# -# - repo: local -# hooks: -# - id: isort -# name: isort -# entry: poetry run isort --settings-path pyproject.toml -# types: [python] -# language: system + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v3.0.3" + hooks: + - id: prettier + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.5.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + exclude: LICENSE + + # Due to UP007 and Typer this stays disabled: https://github.com/tiangolo/typer/issues/533 + # - repo: local + # hooks: + # - id: pyupgrade + # name: pyupgrade + # entry: poetry run pyupgrade --py310-plus + # types: [python] + # language: system + - repo: local + hooks: + - id: isort + name: isort + entry: poetry run isort --settings-path pyproject.toml + types: [python] + language: system # # - repo: local # hooks: diff --git a/tidal_dl_ng/cli.py b/tidal_dl_ng/cli.py index e85d080..077bcf3 100644 --- a/tidal_dl_ng/cli.py +++ b/tidal_dl_ng/cli.py @@ -1,7 +1,8 @@ #!/usr/bin/env python -from pathlib import Path from typing import Annotated, Optional +from pathlib import Path + import typer from rich.live import Live from rich.panel import Panel diff --git a/tidal_dl_ng/config.py b/tidal_dl_ng/config.py index aeb5492..81c07df 100644 --- a/tidal_dl_ng/config.py +++ b/tidal_dl_ng/config.py @@ -1,6 +1,7 @@ +from typing import Any + from collections.abc import Callable from json import JSONDecodeError -from typing import Any import tidalapi from requests import HTTPError diff --git a/tidal_dl_ng/model/gui_data.py b/tidal_dl_ng/model/gui_data.py index 0830011..19ef835 100644 --- a/tidal_dl_ng/model/gui_data.py +++ b/tidal_dl_ng/model/gui_data.py @@ -29,4 +29,3 @@ class ResultSearch: album: str duration_sec: int obj: object -