Skip to content

Commit 5e7d228

Browse files
committed
fix pre-commit errors
1 parent 51d6c86 commit 5e7d228

25 files changed

Lines changed: 227 additions & 227 deletions

‎.pre-commit-config.yaml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.13.0
4+
hooks:
5+
- id: ruff-check
6+
args: ['--ignore', 'F401']
7+
- id: ruff-format
8+
9+
- repo: local
10+
hooks:
11+
- id: cargo-fmt
12+
name: cargo fmt
13+
entry: cargo fmt --check
14+
language: system
15+
pass_filenames: false
16+
17+
- id: cargo-clippy
18+
name: cargo clippy
19+
entry: cargo clippy -- -D warnings
20+
language: system
21+
pass_filenames: false
22+
23+
- id: pytest
24+
name: pytest
25+
entry: .venv/bin/pytest
26+
language: system
27+
pass_filenames: false

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ciphertoken"
3-
version = "0.1.7"
3+
version = "0.1.8"
44
edition = "2021"
55

66
[lib]

‎ciphertoken/__init__.py‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
"""Public Python API for ciphertoken."""
22

3-
from .algorithms import EDDSA, ES256, ES384, HS256, HS384, HS512, PS256, PS384, PS512, RS256, RS384, RS512
3+
from .algorithms import (
4+
EDDSA,
5+
ES256,
6+
ES384,
7+
HS256,
8+
HS384,
9+
HS512,
10+
PS256,
11+
PS384,
12+
PS512,
13+
RS256,
14+
RS384,
15+
RS512,
16+
)
417
from .ciphertoken import CipherToken, is_jwt_format, validate_jwt_format
518
from .jwt import TOKEN_ACCESS as JWT_TOKEN_ACCESS, TOKEN_REFRESH as JWT_TOKEN_REFRESH
619
from .jwt import access as jwt_access, refresh as jwt_refresh, rotation as jwt_rotation
7-
from .jwt import access_async as jwt_access_async, refresh_async as jwt_refresh_async, rotation_async as jwt_rotation_async
8-
from .secret import generate_hmac_secret, generate_hmac_secret_async, generate_rsa_keypair, secret_key, secret_key_with_size
20+
from .jwt import (
21+
access_async as jwt_access_async,
22+
refresh_async as jwt_refresh_async,
23+
rotation_async as jwt_rotation_async,
24+
)
25+
from .secret import (
26+
generate_hmac_secret,
27+
generate_hmac_secret_async,
28+
generate_rsa_keypair,
29+
secret_key,
30+
secret_key_with_size,
31+
)
932
from .time import days, hours, minutes, now, seconds, weeks
1033
from .utils import DEFAULT_SECRET_SIZE, MIN_SECRET_SIZE, TOKEN_ACCESS, TOKEN_REFRESH
1134

‎ciphertoken/__init__.pyi‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎ciphertoken/algorithms.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,17 @@
1515
PS512 = _algorithms.PS512
1616
EDDSA = _algorithms.EDDSA
1717

18-
__all__ = ["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "PS256", "PS384", "PS512", "EDDSA"]
18+
__all__ = [
19+
"HS256",
20+
"HS384",
21+
"HS512",
22+
"RS256",
23+
"RS384",
24+
"RS512",
25+
"ES256",
26+
"ES384",
27+
"PS256",
28+
"PS384",
29+
"PS512",
30+
"EDDSA",
31+
]

‎ciphertoken/algorithms.pyi‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎ciphertoken/ciphertoken.pyi‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎ciphertoken/jwt.pyi‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎ciphertoken/py.typed‎

Whitespace-only changes.

0 commit comments

Comments
 (0)