From aceaa69c9afab935858820491169e251ee2e0b06 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 17:24:06 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.4 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.4...v0.5.0) - [github.com/asottile/blacken-docs: 1.16.0 → 1.18.0](https://github.com/asottile/blacken-docs/compare/1.16.0...1.18.0) - [github.com/python-jsonschema/check-jsonschema: 0.28.4 → 0.28.6](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.4...0.28.6) - [github.com/rhysd/actionlint: v1.7.0 → v1.7.1](https://github.com/rhysd/actionlint/compare/v1.7.0...v1.7.1) - [github.com/tox-dev/pyproject-fmt: 1.7.0 → 2.1.3](https://github.com/tox-dev/pyproject-fmt/compare/1.7.0...2.1.3) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d54f50..0895936 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.4 + rev: v0.5.0 hooks: - id: ruff args: [--exit-non-zero-on-fix] @@ -11,7 +11,7 @@ repos: - id: black - repo: https://github.com/asottile/blacken-docs - rev: 1.16.0 + rev: 1.18.0 hooks: - id: blacken-docs args: [--target-version=py38] @@ -33,18 +33,18 @@ repos: exclude: .github/(ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE).md - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.28.6 hooks: - id: check-github-workflows - id: check-renovate - repo: https://github.com/rhysd/actionlint - rev: v1.7.0 + rev: v1.7.1 hooks: - id: actionlint - repo: https://github.com/tox-dev/pyproject-fmt - rev: 1.7.0 + rev: 2.1.3 hooks: - id: pyproject-fmt additional_dependencies: [tox] From 184d0328a97f76572da2e89c0ba8d6c5b2d9eada Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 2 Jul 2024 14:29:20 +0300 Subject: [PATCH 2/2] Configure pyproject-fmt to add Python 3.13 classifier --- .pre-commit-config.yaml | 1 - pyproject.toml | 63 +++++++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0895936..477419b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,6 @@ repos: rev: 2.1.3 hooks: - id: pyproject-fmt - additional_dependencies: [tox] - repo: https://github.com/abravalheri/validate-pyproject rev: v0.18 diff --git a/pyproject.toml b/pyproject.toml index 9887d1f..0586bb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,9 +15,13 @@ keywords = [ "scrobble", "scrobbling", ] -license = {text = "Apache-2.0"} -maintainers = [{name = "Hugo van Kemenade"}] -authors = [{name = "Amr Hassan and Contributors", email = "amr.hassan@gmail.com"}] +license = { text = "Apache-2.0" } +maintainers = [ + { name = "Hugo van Kemenade" }, +] +authors = [ + { name = "Amr Hassan and Contributors", email = "amr.hassan@gmail.com" }, +] requires-python = ">=3.8" classifiers = [ "Development Status :: 5 - Production/Stable", @@ -41,18 +45,16 @@ dynamic = [ dependencies = [ "httpx", ] -[project.optional-dependencies] -tests = [ +optional-dependencies.tests = [ "flaky", "pytest", "pytest-cov", "pytest-random-order", "pyyaml", ] -[project.urls] -Changelog = "https://github.com/pylast/pylast/releases" -Homepage = "https://github.com/pylast/pylast" -Source = "https://github.com/pylast/pylast" +urls.Changelog = "https://github.com/pylast/pylast/releases" +urls.Homepage = "https://github.com/pylast/pylast" +urls.Source = "https://github.com/pylast/pylast" [tool.hatch] version.source = "vcs" @@ -60,29 +62,36 @@ version.source = "vcs" [tool.hatch.version.raw-options] local_scheme = "no-local-version" -[tool.ruff.lint] -select = [ - "C4", # flake8-comprehensions - "E", # pycodestyle errors - "EM", # flake8-errmsg - "F", # pyflakes errors - "I", # isort - "ISC", # flake8-implicit-str-concat - "LOG", # flake8-logging - "PGH", # pygrep-hooks - "RUF100", # unused noqa (yesqa) +[tool.ruff] +fix = true + +lint.select = [ + "C4", # flake8-comprehensions + "E", # pycodestyle errors + "EM", # flake8-errmsg + "F", # pyflakes errors + "I", # isort + "ISC", # flake8-implicit-str-concat + "LOG", # flake8-logging + "PGH", # pygrep-hooks "RUF022", # unsorted-dunder-all - "UP", # pyupgrade - "W", # pycodestyle warnings - "YTT", # flake8-2020 + "RUF100", # unused noqa (yesqa) + "UP", # pyupgrade + "W", # pycodestyle warnings + "YTT", # flake8-2020 ] -extend-ignore = [ +lint.extend-ignore = [ "E203", # Whitespace before ':' "E221", # Multiple spaces before operator "E226", # Missing whitespace around arithmetic operator "E241", # Multiple spaces after ',' ] +lint.isort.known-first-party = [ + "pylast", +] +lint.isort.required-imports = [ + "from __future__ import annotations", +] -[tool.ruff.lint.isort] -known-first-party = ["pylast"] -required-imports = ["from __future__ import annotations"] +[tool.pyproject-fmt] +max_supported_python = "3.13"