diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8eb3722..b4c460b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,7 +39,7 @@ jobs: echo "::set-output name=dir::$(pip cache dir)" - name: pip cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }} diff --git a/magic_filter/magic.py b/magic_filter/magic.py index 77266e7..a46ae21 100644 --- a/magic_filter/magic.py +++ b/magic_filter/magic.py @@ -280,7 +280,7 @@ def regexp( regexp_func = getattr(pattern, mode) return self._extend(FunctionOperation(regexp_func)) - def func(self: MagicT, func: Callable[[Any], Any], *args: Any, **kwargs: Any) -> MagicT: + def func(self: MagicT, func: Callable[..., Any], *args: Any, **kwargs: Any) -> MagicT: return self._extend(FunctionOperation(func, *args, **kwargs)) def cast(self: MagicT, func: Callable[[Any], Any]) -> MagicT: diff --git a/magic_filter/operations/base.py b/magic_filter/operations/base.py index 2745990..84ee249 100644 --- a/magic_filter/operations/base.py +++ b/magic_filter/operations/base.py @@ -3,6 +3,8 @@ class BaseOperation(ABC): + __slots__ = () + important: bool = False @abstractmethod