From afa635016e2ca7919b71967abba98246cc4d206c Mon Sep 17 00:00:00 2001 From: lores Date: Sat, 22 Mar 2025 22:26:04 +0200 Subject: [PATCH 1/3] Update function signature to accept variable argument types --- magic_filter/magic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From c4162b428c525b263962508a920783a5d95beae8 Mon Sep 17 00:00:00 2001 From: lores Date: Sat, 29 Mar 2025 21:27:17 +0200 Subject: [PATCH 2/3] Add __slots__ to BaseOperation class --- magic_filter/operations/base.py | 2 ++ 1 file changed, 2 insertions(+) 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 From cc2a2eb74845c8f1351466af7aa50b218e1597c4 Mon Sep 17 00:00:00 2001 From: lores Date: Tue, 1 Apr 2025 13:23:54 +0300 Subject: [PATCH 3/3] Update actions/cache to version 4 in GitHub Workflows --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') }}