From 6a7a23cd9a508a7e1ca7c48fc4f5ffa7da39930b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 19:10:46 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.12.0 → 23.3.0](https://github.com/psf/black/compare/22.12.0...23.3.0) - [github.com/asottile/blacken-docs: v1.12.1 → 1.13.0](https://github.com/asottile/blacken-docs/compare/v1.12.1...1.13.0) - [github.com/pre-commit/pygrep-hooks: v1.9.0 → v1.10.0](https://github.com/pre-commit/pygrep-hooks/compare/v1.9.0...v1.10.0) - [github.com/tox-dev/pyproject-fmt: 0.4.1 → 0.9.2](https://github.com/tox-dev/pyproject-fmt/compare/0.4.1...0.9.2) - [github.com/abravalheri/validate-pyproject: v0.10.1 → v0.12.2](https://github.com/abravalheri/validate-pyproject/compare/v0.10.1...v0.12.2) - [github.com/tox-dev/tox-ini-fmt: 0.5.2 → 1.0.0](https://github.com/tox-dev/tox-ini-fmt/compare/0.5.2...1.0.0) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86f2f3e..41b6873 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,13 +6,13 @@ repos: args: [--py37-plus] - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.3.0 hooks: - id: black args: [--target-version=py37] - repo: https://github.com/asottile/blacken-docs - rev: v1.12.1 + rev: 1.13.0 hooks: - id: blacken-docs args: [--target-version=py37] @@ -30,7 +30,7 @@ repos: additional_dependencies: [flake8-2020, flake8-implicit-str-concat] - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: - id: python-check-blanket-noqa @@ -45,17 +45,17 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/tox-dev/pyproject-fmt - rev: 0.4.1 + rev: 0.9.2 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.10.1 + rev: v0.12.2 hooks: - id: validate-pyproject - repo: https://github.com/tox-dev/tox-ini-fmt - rev: 0.5.2 + rev: 1.0.0 hooks: - id: tox-ini-fmt From 879591e1cc90c997d9d3c940686e255d91dae5bc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 19:10:56 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 16 +++++++--------- src/pylast/__init__.py | 4 ---- tests/test_pylast.py | 1 - tox.ini | 8 ++++---- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 461b858..141679e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,13 +19,6 @@ license = {text = "Apache-2.0"} maintainers = [{name = "Hugo van Kemenade"}] authors = [{name = "Amr Hassan and Contributors", email = "amr.hassan@gmail.com"}] requires-python = ">=3.7" -dependencies = [ - "httpx", - 'importlib-metadata; python_version < "3.8"', -] -dynamic = [ - "version", -] classifiers = [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", @@ -42,6 +35,13 @@ classifiers = [ "Topic :: Multimedia :: Sound/Audio", "Topic :: Software Development :: Libraries :: Python Modules", ] +dynamic = [ + "version", +] +dependencies = [ + "httpx", + 'importlib-metadata; python_version < "3.8"', +] [project.optional-dependencies] tests = [ "flaky", @@ -50,13 +50,11 @@ tests = [ "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" - [tool.hatch] version.source = "vcs" diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py index e152c31..c6cd8be 100644 --- a/src/pylast/__init__.py +++ b/src/pylast/__init__.py @@ -546,7 +546,6 @@ class _Network: context=None, mbid=None, ): - """Used to add a track-play to a user's profile. Parameters: @@ -600,7 +599,6 @@ class _Network: params = {} for i in range(len(tracks_to_scrobble)): - params[f"artist[{i}]"] = tracks_to_scrobble[i]["artist"] params[f"track[{i}]"] = tracks_to_scrobble[i]["title"] @@ -621,7 +619,6 @@ class _Network: } for arg in additional_args: - if arg in tracks_to_scrobble[i] and tracks_to_scrobble[i][arg]: if arg in args_map_to: maps_to = args_map_to[arg] @@ -736,7 +733,6 @@ class LibreFMNetwork(_Network): username: str = "", password_hash: str = "", ) -> None: - super().__init__( name="Libre.fm", homepage="https://libre.fm", diff --git a/tests/test_pylast.py b/tests/test_pylast.py index 7125413..cdaf50e 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -47,7 +47,6 @@ def _no_xfail_rerun_filter(err, name, test, plugin) -> bool: @flaky(max_runs=3, min_passes=1, rerun_filter=_no_xfail_rerun_filter) class TestPyLastWithLastFm(PyLastTestCase): - secrets = None def unix_timestamp(self): diff --git a/tox.ini b/tox.ini index a06262e..de0b9da 100644 --- a/tox.ini +++ b/tox.ini @@ -5,23 +5,23 @@ envlist = isolated_build = true [testenv] +extras = + tests passenv = FORCE_COLOR PYLAST_API_KEY PYLAST_API_SECRET PYLAST_PASSWORD_HASH PYLAST_USERNAME -extras = - tests commands = pytest -v -s -W all --cov pylast --cov tests --cov-report term-missing --cov-report xml --random-order {posargs} [testenv:lint] -passenv = - PRE_COMMIT_COLOR skip_install = true deps = pre-commit +passenv = + PRE_COMMIT_COLOR commands = pre-commit run --all-files --show-diff-on-failure From cdb88b9bbbce884865755ead8112155fb230774b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 18 Apr 2023 05:28:30 -0600 Subject: [PATCH 3/3] Update pre-commit --- .pre-commit-config.yaml | 4 ++-- tox.ini | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41b6873..b4d8bf3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: hooks: - id: blacken-docs args: [--target-version=py37] - additional_dependencies: [black==22.12.0] + additional_dependencies: [black==23.3.0] - repo: https://github.com/PyCQA/isort rev: 5.12.0 @@ -55,7 +55,7 @@ repos: - id: validate-pyproject - repo: https://github.com/tox-dev/tox-ini-fmt - rev: 1.0.0 + rev: 1.3.0 hooks: - id: tox-ini-fmt diff --git a/tox.ini b/tox.ini index de0b9da..7c01999 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,14 @@ [tox] -envlist = +requires = + tox>=4.2 +env_list = lint py{py3, 311, 310, 39, 38, 37} -isolated_build = true [testenv] extras = tests -passenv = +pass_env = FORCE_COLOR PYLAST_API_KEY PYLAST_API_SECRET @@ -20,7 +21,7 @@ commands = skip_install = true deps = pre-commit -passenv = +pass_env = PRE_COMMIT_COLOR commands = pre-commit run --all-files --show-diff-on-failure