import re
import sys
from os import replace
from typing import Any, Callable, Iterator

# from mypy_extensions import DefaultNamedArg, VarArg
from ezregex import EZRegex

from ..EZRegex import EZRegex

class PythonEZRegex(EZRegex):
    # Shadowing the re functions
    def compile(self, add_flags:bool=True): ...
    def search(self, string, pos:int=0, endpos:int=sys.maxsize) -> re.Match|None: ...
    def match(self, string, pos:int=0, endpos:int=sys.maxsize) -> re.Match|None: ...
    def fullmatch(self, string, pos:int=0, endpos:int=sys.maxsize) -> re.Match|None: ...
    def split(self, string, maxsplit:int=0) -> list: ...
    def findall(self, string, pos: int = 0, endpos: int = sys.maxsize) -> list: ...
    def finditer(self, string, pos: int = 0, endpos: int = sys.maxsize) -> Iterator[re.Match]: ...
    def sub(self, repl: Any | Callable[[re.Match], Any], string, count: int = 0): ...
    def subn(self, repl: Any | Callable[[re.Match], Any], string, count: int = 0): ...
