Skip to content

Commit

Permalink
Update versions. Fix ruff complaints.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhoherd committed Jun 25, 2024
1 parent 00fe441 commit 34b071f
Show file tree
Hide file tree
Showing 7 changed files with 286 additions and 325 deletions.
23 changes: 12 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ repos:
- id: python-check-blanket-type-ignore
- id: text-unicode-replacement-char
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
rev: "v3.1.0"
hooks:
- id: prettier
args: ["--print-width=135"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
rev: v3.16.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.292"
rev: "v0.4.10"
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
rev: 1.7.9
hooks:
- id: bandit
args: ["-s", "B101"]
Expand All @@ -41,11 +41,11 @@ repos:
hooks:
- id: pydocstyle
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.1.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-byte-order-marker
- id: check-case-conflict
Expand All @@ -69,18 +69,19 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
rev: v1.35.1
hooks:
- id: yamllint
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
rev: v1.5.5
hooks:
- id: remove-tabs
exclude_types: [makefile, binary]
- repo: https://github.com/danielhoherd/pre-commit-hooks
rev: 8b2d969bd549cd7c9454cc8bb54eec5b35c2e5e6
rev: 976b58ba36fcd3313fed6d5a7abc228cec64f994
hooks:
- id: CVE-2017-18342
- id: remove-unicode-left-to-right-mark
- id: remove-unicode-zero-width-non-breaking-spaces
- id: remove-unicode-zero-width-space
- id: replace-en-dashes
Expand Down
1 change: 1 addition & 0 deletions plexdl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Shim for package execution (python3 -m plexdl ...)."""

from .cli import app

if __name__ == "__main__": # pragma: no cover
Expand Down
3 changes: 2 additions & 1 deletion plexdl/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""plexdl CLI."""

import datetime
import logging
import sys
Expand All @@ -24,7 +25,7 @@ def get_logger(ctx, param, value):
return value


app = typer.Typer(help=__doc__, context_settings=dict(max_content_width=9999))
app = typer.Typer(help=__doc__, context_settings={"max_content_width": 9999})


@app.command()
Expand Down
3 changes: 2 additions & 1 deletion plexdl/plexdl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""plexdl client class."""

import locale
import logging
from typing import List
Expand Down Expand Up @@ -28,7 +29,7 @@ def __init__(self, **kwargs):
self.username = kwargs["username"]
self.account = MyPlexAccount(self.username, self.password)

available_servers: List[PlexServer] = list()
available_servers: List[PlexServer] = []

@staticmethod
def print_item_info(self, item, access_token):
Expand Down
550 changes: 251 additions & 299 deletions poetry.lock

Large diffs are not rendered by default.

30 changes: 17 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ plexdl = 'plexdl.cli:app'

[tool.poetry.dependencies]
humanfriendly = "^10.0"
importlib-metadata = "^7.0.1"
importlib-metadata = "^7.2.1"
pendulum = "^3.0.0"
PlexAPI = "^4.15.10"
PlexAPI = "^4.15.14"
python = "^3.11"
requests = "^2.31.0"
typer = "^0.9.0"
requests = "^2.32.3"
typer = "^0.12.3"
humanize = "^4.9.0"

[tool.poetry.group.dev.dependencies]
black = "^22.12.0"
flake8 = "^6.0.0"
pytest = "^7.2.0"
tox = "^4.0.16"
pdbr = "^0.7.6"
black = "^24.4.2"
flake8 = "^7.1.0"
pytest = "^8.2.2"
tox = "^4.15.1"
pdbr = "^0.8.8"

[tool.black]
line-length = 132
Expand Down Expand Up @@ -59,11 +59,15 @@ ignore = E265
requires = ["poetry>=1.5.1"]
build-backend = "poetry.masonry.api"

[tool.ruff]
[tool.ruff.lint]
fixable = ["ALL"]
select = ["E", "F", "Q", "S"]
ignore = ["E501", "S311", "S603", "S608", "Q000", "S108"]
select = ["C", "E", "F", "Q", "S"]
ignore = ["E501", "S311", "S603", "S608", "S607"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
"**/__init__.py" = ["F401"]

[tool.ruff.lint.mccabe]
# TODO: reduce this
max-complexity = 11
1 change: 1 addition & 0 deletions tests/example_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""plexdl boilerplate tests."""

from plexdl.plexdl import Client


Expand Down

0 comments on commit 34b071f

Please sign in to comment.