Merge pull request #346 from pylast/updates

This commit is contained in:
Hugo van Kemenade 2020-09-12 00:10:51 +03:00 committed by GitHub
commit 91f79fd4b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 92 additions and 89 deletions

View file

@ -2,9 +2,12 @@ name: Lint
on: [push, pull_request] on: [push, pull_request]
env:
FORCE_COLOR: 1
jobs: jobs:
build: build:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View file

@ -3,33 +3,28 @@ repos:
rev: v2.7.2 rev: v2.7.2
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: ["--py3-plus"] args: ["--py36-plus"]
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 19.10b0 rev: 20.8b1
hooks: hooks:
- id: black - id: black
args: ["--target-version", "py35"] args: ["--target-version", "py36"]
# override until resolved: https://github.com/psf/black/issues/402 # override until resolved: https://github.com/psf/black/issues/402
files: \.pyi?$ files: \.pyi?$
types: [] types: []
- repo: https://github.com/PyCQA/isort
rev: 5.5.2
hooks:
- id: isort
- repo: https://gitlab.com/pycqa/flake8 - repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3 rev: 3.8.3
hooks: hooks:
- id: flake8 - id: flake8
additional_dependencies: [flake8-2020, flake8-implicit-str-concat] additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: 5.4.2
hooks:
- id: isort
- repo: https://github.com/pre-commit/pygrep-hooks - repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.6.0 rev: v1.6.0
hooks: hooks:

View file

@ -23,7 +23,6 @@ matrix:
- python: 3.8 - python: 3.8
- python: 3.7 - python: 3.7
- python: 3.6 - python: 3.6
- python: 3.5
- python: 3.9-dev - python: 3.9-dev
- python: 3.10-dev - python: 3.10-dev
- python: pypy3 - python: pypy3

View file

@ -31,11 +31,13 @@ Or from requirements.txt:
Note: Note:
* pylast 3.0.0+ supports Python 3.5+ ([#265](https://github.com/pylast/pylast/issues/265)) * pyLast 4.0.0+ supports Python 3.6+.
* pyLast 2.2.0 - 2.4.0 supports Python 2.7.10+, 3.4, 3.5, 3.6, 3.7. * pyLast 3.2.0 - 3.3.0 supports Python 3.5-3.8.
* pyLast 2.0.0 - 2.1.0 supports Python 2.7.10+, 3.4, 3.5, 3.6. * pyLast 3.0.0 - 3.1.0 supports Python 3.5-3.7.
* pyLast 1.7.0 - 1.9.0 supports Python 2.7, 3.3, 3.4, 3.5, 3.6. * pyLast 2.2.0 - 2.4.0 supports Python 2.7.10+, 3.4-3.7.
* pyLast 1.0.0 - 1.6.0 supports Python 2.7, 3.3, 3.4. * pyLast 2.0.0 - 2.1.0 supports Python 2.7.10+, 3.4-3.6.
* pyLast 1.7.0 - 1.9.0 supports Python 2.7, 3.3-3.6.
* pyLast 1.0.0 - 1.6.0 supports Python 2.7, 3.3-3.4.
* pyLast 0.5 supports Python 2, 3. * pyLast 0.5 supports Python 2, 3.
* pyLast < 0.5 supports Python 2. * pyLast < 0.5 supports Python 2.
@ -49,7 +51,6 @@ Features
* Proxy support. * Proxy support.
* Internal caching support for some web services calls (disabled by default). * Internal caching support for some web services calls (disabled by default).
* Support for other API-compatible networks like Libre.fm. * Support for other API-compatible networks like Libre.fm.
* Python 3-friendly (Starting from 0.5).
Getting started Getting started

View file

@ -1,6 +1,5 @@
[flake8] [flake8]
ignore = W503
max_line_length = 88 max_line_length = 88
[tool:isort] [tool:isort]
known_third_party = flaky,pkg_resources,pylast,pytest,setuptools profile = black

View file

@ -27,7 +27,7 @@ setup(
extras_require={ extras_require={
"tests": ["flaky", "pytest", "pytest-cov", "pytest-random-order", "pyyaml"] "tests": ["flaky", "pytest", "pytest-cov", "pytest-random-order", "pyyaml"]
}, },
python_requires=">=3.5", python_requires=">=3.6",
classifiers=[ classifiers=[
"Development Status :: 5 - Production/Stable", "Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: Apache Software License",
@ -35,7 +35,6 @@ setup(
"Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio",
"Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",

View file

@ -2,9 +2,10 @@
""" """
Integration (not unit) tests for pylast.py Integration (not unit) tests for pylast.py
""" """
import pylast
import pytest import pytest
import pylast
from .test_pylast import WRITE_TEST, TestPyLastWithLastFm from .test_pylast import WRITE_TEST, TestPyLastWithLastFm

View file

@ -2,9 +2,10 @@
""" """
Integration (not unit) tests for pylast.py Integration (not unit) tests for pylast.py
""" """
import pylast
from flaky import flaky from flaky import flaky
import pylast
from .test_pylast import PyLastTestCase, load_secrets from .test_pylast import PyLastTestCase, load_secrets

View file

@ -5,9 +5,10 @@ Integration (not unit) tests for pylast.py
import re import re
import time import time
import pylast
import pytest import pytest
import pylast
from .test_pylast import WRITE_TEST, TestPyLastWithLastFm from .test_pylast import WRITE_TEST, TestPyLastWithLastFm

View file

@ -6,10 +6,11 @@ import os
import sys import sys
import time import time
import pylast
import pytest import pytest
from flaky import flaky from flaky import flaky
import pylast
WRITE_TEST = sys.version_info[:2] == (3, 8) WRITE_TEST = sys.version_info[:2] == (3, 8)

View file

@ -4,9 +4,10 @@ Integration (not unit) tests for pylast.py
""" """
import time import time
import pylast
import pytest import pytest
import pylast
from .test_pylast import WRITE_TEST, TestPyLastWithLastFm from .test_pylast import WRITE_TEST, TestPyLastWithLastFm

View file

@ -8,9 +8,10 @@ import os
import re import re
import warnings import warnings
import pylast
import pytest import pytest
import pylast
from .test_pylast import TestPyLastWithLastFm from .test_pylast import TestPyLastWithLastFm

View file

@ -1,8 +1,9 @@
from unittest import mock from unittest import mock
import pylast
import pytest import pytest
import pylast
def mock_network(): def mock_network():
return mock.Mock(_get_ws_auth=mock.Mock(return_value=("", "", ""))) return mock.Mock(_get_ws_auth=mock.Mock(return_value=("", "", "")))