[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
6a7a23cd9a
commit
879591e1cc
|
@ -19,13 +19,6 @@ license = {text = "Apache-2.0"}
|
||||||
maintainers = [{name = "Hugo van Kemenade"}]
|
maintainers = [{name = "Hugo van Kemenade"}]
|
||||||
authors = [{name = "Amr Hassan <amr.hassan@gmail.com> and Contributors", email = "amr.hassan@gmail.com"}]
|
authors = [{name = "Amr Hassan <amr.hassan@gmail.com> and Contributors", email = "amr.hassan@gmail.com"}]
|
||||||
requires-python = ">=3.7"
|
requires-python = ">=3.7"
|
||||||
dependencies = [
|
|
||||||
"httpx",
|
|
||||||
'importlib-metadata; python_version < "3.8"',
|
|
||||||
]
|
|
||||||
dynamic = [
|
|
||||||
"version",
|
|
||||||
]
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"License :: OSI Approved :: Apache Software License",
|
"License :: OSI Approved :: Apache Software License",
|
||||||
|
@ -42,6 +35,13 @@ classifiers = [
|
||||||
"Topic :: Multimedia :: Sound/Audio",
|
"Topic :: Multimedia :: Sound/Audio",
|
||||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||||
]
|
]
|
||||||
|
dynamic = [
|
||||||
|
"version",
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"httpx",
|
||||||
|
'importlib-metadata; python_version < "3.8"',
|
||||||
|
]
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
tests = [
|
tests = [
|
||||||
"flaky",
|
"flaky",
|
||||||
|
@ -50,13 +50,11 @@ tests = [
|
||||||
"pytest-random-order",
|
"pytest-random-order",
|
||||||
"pyyaml",
|
"pyyaml",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Changelog = "https://github.com/pylast/pylast/releases"
|
Changelog = "https://github.com/pylast/pylast/releases"
|
||||||
Homepage = "https://github.com/pylast/pylast"
|
Homepage = "https://github.com/pylast/pylast"
|
||||||
Source = "https://github.com/pylast/pylast"
|
Source = "https://github.com/pylast/pylast"
|
||||||
|
|
||||||
|
|
||||||
[tool.hatch]
|
[tool.hatch]
|
||||||
version.source = "vcs"
|
version.source = "vcs"
|
||||||
|
|
||||||
|
|
|
@ -546,7 +546,6 @@ class _Network:
|
||||||
context=None,
|
context=None,
|
||||||
mbid=None,
|
mbid=None,
|
||||||
):
|
):
|
||||||
|
|
||||||
"""Used to add a track-play to a user's profile.
|
"""Used to add a track-play to a user's profile.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
@ -600,7 +599,6 @@ class _Network:
|
||||||
|
|
||||||
params = {}
|
params = {}
|
||||||
for i in range(len(tracks_to_scrobble)):
|
for i in range(len(tracks_to_scrobble)):
|
||||||
|
|
||||||
params[f"artist[{i}]"] = tracks_to_scrobble[i]["artist"]
|
params[f"artist[{i}]"] = tracks_to_scrobble[i]["artist"]
|
||||||
params[f"track[{i}]"] = tracks_to_scrobble[i]["title"]
|
params[f"track[{i}]"] = tracks_to_scrobble[i]["title"]
|
||||||
|
|
||||||
|
@ -621,7 +619,6 @@ class _Network:
|
||||||
}
|
}
|
||||||
|
|
||||||
for arg in additional_args:
|
for arg in additional_args:
|
||||||
|
|
||||||
if arg in tracks_to_scrobble[i] and tracks_to_scrobble[i][arg]:
|
if arg in tracks_to_scrobble[i] and tracks_to_scrobble[i][arg]:
|
||||||
if arg in args_map_to:
|
if arg in args_map_to:
|
||||||
maps_to = args_map_to[arg]
|
maps_to = args_map_to[arg]
|
||||||
|
@ -736,7 +733,6 @@ class LibreFMNetwork(_Network):
|
||||||
username: str = "",
|
username: str = "",
|
||||||
password_hash: str = "",
|
password_hash: str = "",
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
name="Libre.fm",
|
name="Libre.fm",
|
||||||
homepage="https://libre.fm",
|
homepage="https://libre.fm",
|
||||||
|
|
|
@ -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)
|
@flaky(max_runs=3, min_passes=1, rerun_filter=_no_xfail_rerun_filter)
|
||||||
class TestPyLastWithLastFm(PyLastTestCase):
|
class TestPyLastWithLastFm(PyLastTestCase):
|
||||||
|
|
||||||
secrets = None
|
secrets = None
|
||||||
|
|
||||||
def unix_timestamp(self):
|
def unix_timestamp(self):
|
||||||
|
|
8
tox.ini
8
tox.ini
|
@ -5,23 +5,23 @@ envlist =
|
||||||
isolated_build = true
|
isolated_build = true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
extras =
|
||||||
|
tests
|
||||||
passenv =
|
passenv =
|
||||||
FORCE_COLOR
|
FORCE_COLOR
|
||||||
PYLAST_API_KEY
|
PYLAST_API_KEY
|
||||||
PYLAST_API_SECRET
|
PYLAST_API_SECRET
|
||||||
PYLAST_PASSWORD_HASH
|
PYLAST_PASSWORD_HASH
|
||||||
PYLAST_USERNAME
|
PYLAST_USERNAME
|
||||||
extras =
|
|
||||||
tests
|
|
||||||
commands =
|
commands =
|
||||||
pytest -v -s -W all --cov pylast --cov tests --cov-report term-missing --cov-report xml --random-order {posargs}
|
pytest -v -s -W all --cov pylast --cov tests --cov-report term-missing --cov-report xml --random-order {posargs}
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
passenv =
|
|
||||||
PRE_COMMIT_COLOR
|
|
||||||
skip_install = true
|
skip_install = true
|
||||||
deps =
|
deps =
|
||||||
pre-commit
|
pre-commit
|
||||||
|
passenv =
|
||||||
|
PRE_COMMIT_COLOR
|
||||||
commands =
|
commands =
|
||||||
pre-commit run --all-files --show-diff-on-failure
|
pre-commit run --all-files --show-diff-on-failure
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue