Skip to content

Commit

Permalink
sistana: fix: import nepattern
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyElaina committed Sep 22, 2024
1 parent 49f23ad commit 8477cc4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/arclet/alconna/sistana/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ def apply_nepattern(self, pat: BasePattern | None = None, capture_mode: bool = F
if self.type is None:
return

from nepattern import type_parser, MatchMode

from nepattern import type_parser

pat = type_parser(self.type.value)
assert pat is not None

from nepattern import MatchMode

if capture_mode:
if pat.mode in (MatchMode.REGEX_MATCH, MatchMode.REGEX_CONVERT):
self.capture = RegexCapture(pat.regex_pattern)
Expand Down

0 comments on commit 8477cc4

Please sign in to comment.