Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch 'master' into feat/custom-device #431

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
repos:
- repo: local
hooks:
- id: black
name: black
entry: black
- id: ruff-format
name: ruff format
entry: ruff format
language: system
types: [python]
require_serial: true
Expand Down Expand Up @@ -33,8 +33,8 @@ repos:
language: system
types: [text]
stages: [commit, push, manual]
- id: ruff
name: ruff
- id: ruff-check
name: ruff check
entry: ruff check
language: system
types: [python]
Expand Down
4 changes: 3 additions & 1 deletion examples/get_activation_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

# or use LoginAuthenticator (without register)
auth = Authenticator.from_login(
username="USERNAME", password="PASSWORD", locale="YOUR_COUNTRY_CODE" # noqa: S106
username="USERNAME",
password="PASSWORD", # noqa: S106
locale="YOUR_COUNTRY_CODE",
)


Expand Down
1 change: 0 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def precommit(session: Session) -> None:
"--show-diff-on-failure",
]
session.install(
"black",
"darglint",
"pre-commit",
"pre-commit-hooks",
Expand Down
101 changes: 22 additions & 79 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 16 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ rsa = ">=4.9"

[tool.poetry.group.dev.dependencies]
Pygments = ">=2.10.0"
black = ">=21.10b0"
coverage = {extras = ["toml"], version = ">=6.2"}
darglint = ">=1.8.1"
mypy = ">=0.930"
Expand All @@ -48,7 +47,7 @@ pre-commit = ">=2.16.0"
pre-commit-hooks = ">=4.1.0"
pytest = ">=6.2.5"
pytest-mock = ">=3.10.0"
ruff = ">=0.0.254"
ruff = ">=0.3.7"
safety = ">=1.10.3"
sphinx = ">=4.3.2"
sphinx-autobuild = ">=2021.3.14"
Expand Down Expand Up @@ -86,7 +85,7 @@ warn_unreachable = true

[tool.ruff]
# missing rst-docstrings check, these should be adding through ruff
line-length = 80
line-length = 88
src = ["src"]
target-version = "py310"
output-format = "grouped"
Expand Down Expand Up @@ -121,12 +120,20 @@ select=[
"UP",
"W",
]
mccabe.max-complexity = 21 # temporarily raise complexity, target is 10
pydocstyle.convention = "google"
isort.force-single-line = false
isort.known-first-party = ["audible"]
isort.lines-after-imports = 2
per-file-ignores."tests/*" = ["S101"]

[tool.ruff.lint.mccabe]
max-complexity = 21 # temporarily raise complexity, target is 10

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.isort]
force-single-line = false
known-first-party = ["audible"]
lines-after-imports = 2

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

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion src/audible/aescipher.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def __init__( # type: ignore[no-untyped-def]
salt_marker: bytes = b"$",
kdf_iterations: int = 1000,
hashmod=sha256,
mac=hmac
mac=hmac,
) -> None:
if not 1 <= len(salt_marker) <= 6:
raise ValueError("The salt_marker must be one to six bytes long.")
Expand Down
Loading