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

[pre-commit.ci] pre-commit autoupdate #367

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ repos:
args: ["--application-directories", "src:tests"]
additional_dependencies: ["setuptools>60.9"]
- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]
Expand Down
6 changes: 2 additions & 4 deletions src/itsdangerous/timed.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,15 @@ def unsign( # type: ignore
signed_value: _t_str_bytes,
max_age: _t_opt_int = None,
return_timestamp: "_te.Literal[False]" = False,
) -> bytes:
...
) -> bytes: ...

@typing.overload
def unsign(
self,
signed_value: _t_str_bytes,
max_age: _t_opt_int = None,
return_timestamp: "_te.Literal[True]" = True,
) -> _t.Tuple[bytes, datetime]:
...
) -> _t.Tuple[bytes, datetime]: ...

def unsign(
self,
Expand Down
6 changes: 2 additions & 4 deletions tests/test_itsdangerous/test_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@


@overload
def coerce_str(ref: str, s: str) -> str:
...
def coerce_str(ref: str, s: str) -> str: ...


@overload
def coerce_str(ref: bytes, s: str) -> bytes:
...
def coerce_str(ref: bytes, s: str) -> bytes: ...


def coerce_str(ref: Union[str, bytes], s: str) -> Union[str, bytes]:
Expand Down
Loading