Skip to content

Commit

Permalink
fix dep inject for CommandResult (#39)
Browse files Browse the repository at this point in the history
* fix dep inject for CommandResult

* 🚨 auto fix by pre-commit hooks

* fix

* fix

* Update model.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
lgc2333 and pre-commit-ci[bot] authored Mar 10, 2024
1 parent 8e40e33 commit 2b568f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/nonebot_plugin_alconna/model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from dataclasses import field, dataclass
from dataclasses import field
from typing_extensions import NotRequired
from typing import Set, Type, Union, Generic, Literal, TypeVar, Optional, TypedDict

from pydantic import ConfigDict
from pydantic.dataclasses import dataclass
from arclet.alconna import Empty, Alconna, Arparma
from arclet.alconna.duplication import Duplication

Expand Down Expand Up @@ -45,7 +47,7 @@ def __repr__(self):
return f"Query({self.path}, {self.result})"


@dataclass(frozen=True)
@dataclass(frozen=True, config=ConfigDict(arbitrary_types_allowed=True))
class CommandResult:
source: Alconna
result: Arparma
Expand Down

0 comments on commit 2b568f1

Please sign in to comment.