Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#48)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.3](astral-sh/ruff-pre-commit@v0.2.2...v0.3.3)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](pre-commit/mirrors-mypy@v1.8.0...v1.9.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed Mar 24, 2024
1 parent 532c6de commit 5ff30ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Expand Up @@ -16,14 +16,14 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.3.3
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
1 change: 1 addition & 0 deletions examples/custom_types.py
@@ -1,4 +1,5 @@
"""An example that demonstrates how to serialize custom types."""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions examples/simple.py
@@ -1,4 +1,5 @@
"""A simple example that serializes a dictionary and prints out the result."""

import asyncio

from asphalt.core import ContainerComponent, Context, run_application
Expand Down
6 changes: 3 additions & 3 deletions src/asphalt/serialization/object_codec.py
Expand Up @@ -25,9 +25,9 @@ def __init__(self, type_key: str = "__type__", state_key: str = "state"):
self.type_key = type_key
self.state_key = state_key
self.wrap_callback: Callable[[str, Any], Any] = self.wrap_state_dict
self.unwrap_callback: Callable[
[Any], tuple[str, Any] | tuple[None, None]
] = self.unwrap_state_dict
self.unwrap_callback: Callable[[Any], tuple[str, Any] | tuple[None, None]] = (
self.unwrap_state_dict
)

def default_encoder(self, obj: Any) -> Any:
obj_type = obj.__class__
Expand Down

0 comments on commit 5ff30ab

Please sign in to comment.