Merge pull request #426 from pylast/pre-commit-ci-update-config

This commit is contained in:
Hugo van Kemenade 2023-04-18 05:49:37 -06:00 committed by GitHub
commit f0ea480334
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 28 deletions

View file

@ -6,17 +6,17 @@ 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]
additional_dependencies: [black==22.12.0]
additional_dependencies: [black==23.3.0]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
@ -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.3.0
hooks:
- id: tox-ini-fmt

View file

@ -19,13 +19,6 @@ license = {text = "Apache-2.0"}
maintainers = [{name = "Hugo van Kemenade"}]
authors = [{name = "Amr Hassan <amr.hassan@gmail.com> 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"

View file

@ -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",

View file

@ -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):

15
tox.ini
View file

@ -1,27 +1,28 @@
[tox]
envlist =
requires =
tox>=4.2
env_list =
lint
py{py3, 311, 310, 39, 38, 37}
isolated_build = true
[testenv]
passenv =
extras =
tests
pass_env =
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
pass_env =
PRE_COMMIT_COLOR
commands =
pre-commit run --all-files --show-diff-on-failure