From fdf756b8550756ae11205d5fabd642eed96a502a Mon Sep 17 00:00:00 2001 From: Daniel Hoherd Date: Sat, 24 Oct 2020 09:22:46 -0700 Subject: [PATCH] Bump versions. Tweak pre-commit. pre-commit run --all-files --- .pre-commit-config.yaml | 29 ++++++++++++++--------------- plexdl/__init__.py | 0 plexdl/cli.py | 2 +- plexdl/plexdl.py | 2 +- pyproject.toml | 14 +++++++------- 5 files changed, 23 insertions(+), 24 deletions(-) mode change 100755 => 100644 plexdl/__init__.py mode change 100755 => 100644 plexdl/cli.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1cc9ace..ba5464a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,19 +1,15 @@ --- exclude: '(venv|.vscode)' # regex repos: + - repo: https://github.com/asottile/pyupgrade + rev: v2.7.3 + hooks: + - id: pyupgrade + args: ['--py37-plus'] - repo: https://github.com/asottile/reorder_python_imports rev: v2.3.5 hooks: - id: reorder-python-imports - - repo: local - hooks: - - id: flynt - name: flynt - entry: flynt - args: ['--fail-on-change', '--quiet'] - types: [python] - language: python - additional_dependencies: ['flynt'] - repo: https://github.com/psf/black rev: 20.8b1 hooks: @@ -28,14 +24,15 @@ repos: hooks: - id: pydocstyle - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.3 + rev: 3.8.4 hooks: - id: flake8 - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v3.3.0 hooks: - id: check-byte-order-marker - id: check-case-conflict + - id: check-executables-have-shebangs - id: check-docstring-first - id: check-json - id: check-merge-conflict @@ -46,18 +43,21 @@ repos: - id: debug-statements - id: detect-private-key - id: end-of-file-fixer + - id: file-contents-sorter + files: .gitignore - id: mixed-line-ending args: ['--fix=lf'] + - id: pretty-format-json - id: requirements-txt-fixer - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.782 + rev: v0.790 hooks: - id: mypy args: ['--no-strict-optional', '--ignore-missing-imports', '--python-version', '3.7'] - repo: https://github.com/adrienverge/yamllint.git - rev: v1.24.2 + rev: v1.25.0 hooks: - id: yamllint - repo: https://github.com/Lucas-C/pre-commit-hooks @@ -66,11 +66,10 @@ repos: - id: remove-tabs exclude_types: [makefile, binary] - repo: https://github.com/danielhoherd/pre-commit-hooks - rev: ac0637d7febb88d1b01f876e47bb5224a9a63eae + rev: fdcede7a5c8ea762c903f242279112161cf35d9f hooks: - id: CVE-2017-18342 - id: remove-en-dashes - id: remove-unicode-non-breaking-spaces - id: remove-unicode-zero-width-non-breaking-spaces - id: remove-unicode-zero-width-space - - id: sort-gitignore diff --git a/plexdl/__init__.py b/plexdl/__init__.py old mode 100755 new mode 100644 diff --git a/plexdl/cli.py b/plexdl/cli.py old mode 100755 new mode 100644 index 908bec0..c285277 --- a/plexdl/cli.py +++ b/plexdl/cli.py @@ -30,7 +30,7 @@ def get_logger(ctx, param, value): @option("-u", "--username", help="Your Plex username (env PLEXDL_USER)", envvar="PLEXDL_USER") @option("-p", "--password", help="Your Plex password (env PLEXDL_PASS)", envvar="PLEXDL_PASS") @option("-r", "--relay/--no-relay", default=False, help="Output relay servers along with direct servers") -@option("--item-prefix", default=str(""), help="String to prefix to each item (eg: curl -o)", envvar="PLEXDL_ITEM_PREFIX") +@option("--item-prefix", default="", help="String to prefix to each item (eg: curl -o)", envvar="PLEXDL_ITEM_PREFIX") @option("--server-info/--no-server-info", default=False, help="Output summary about each server") @option("--summary/--no-summary", default=False, help="Output summary about each result") @option("--ratings/--no-ratings", default=False, help="Output rating information for each result") diff --git a/plexdl/plexdl.py b/plexdl/plexdl.py index 3c015ed..e87202a 100644 --- a/plexdl/plexdl.py +++ b/plexdl/plexdl.py @@ -12,7 +12,7 @@ locale.setlocale(locale.LC_ALL, "") -class Client(object): +class Client: """A client interface to plex for finding direct download URLs.""" def __init__(self, **kwargs): diff --git a/pyproject.toml b/pyproject.toml index b25b880..966f62c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,16 +19,16 @@ plexdl = 'plexdl.cli:main' [tool.poetry.dependencies] python = "^3.7" click = "^7.1.2" -PlexAPI = "^4.0.0" +PlexAPI = "^4.1.2" humanfriendly = "^8.2" importlib_metadata = "^1.6.1" -requests = "^2.23.0" +requests = "^2.24.0" [tool.poetry.dev-dependencies] -black = "^19.10b0" -flake8 = "^3.7" -tox = "^3.15.2" -pytest = "^5.4.3" +black = "^20.8b1" +flake8 = "^3.8.4" +tox = "^3.20.1" +pytest = "^6.1.1" [tool.black] line-length = 132 @@ -53,5 +53,5 @@ commands = ignore = E265 """ [build-system] -requires = ["poetry>=1.0.2"] +requires = ["poetry>=1.1.4"] build-backend = "poetry.masonry.api"