Skip to content

Commit

Permalink
sistana: move type, cast attr to userspace
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyElaina committed Sep 21, 2024
1 parent d125b55 commit cc22687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/arclet/alconna/sistana/fragment.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
from __future__ import annotations

from typing import Any
from dataclasses import dataclass
from elaina_segment import Segment, Quoted, UnmatchedQuoted

from .model.capture import RegexCapture
from .model.fragment import _Fragment
from .utils.misc import Some


@dataclass
class Fragment(_Fragment):
type: Some[Any] = None
cast: bool = False

def apply_msgspec(self):
if self.type is None:
return
Expand Down
2 changes: 0 additions & 2 deletions src/arclet/alconna/sistana/model/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
@dataclass
class _Fragment:
name: str
type: Some[Any] = None
variadic: bool = False
cast: bool = False
default: Some[Any] = None

separators: str | None = None
Expand Down

0 comments on commit cc22687

Please sign in to comment.