You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/08/05 18:52:01 UTC

(superset) branch pre-commit-matrix created (now 2a63367b1e)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a change to branch pre-commit-matrix
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 2a63367b1e fix: mypy issue on py3.9 + prevent similar issues

This branch includes the following new commits:

     new 2a63367b1e fix: mypy issue on py3.9 + prevent similar issues

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(superset) 01/01: fix: mypy issue on py3.9 + prevent similar issues

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch pre-commit-matrix
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 2a63367b1e318504b8f029e9296911211bfeec82
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Mon Aug 5 11:51:41 2024 -0700

    fix: mypy issue on py3.9 + prevent similar issues
---
 .github/workflows/pre-commit.yml           | 6 +++++-
 superset/commands/distributed_lock/base.py | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index af67650192..abc89fc890 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -16,6 +16,9 @@ concurrency:
 jobs:
   pre-commit:
     runs-on: ubuntu-22.04
+    strategy:
+      matrix:
+        python-version: ["current", "next", "previous"]
     steps:
       - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
         uses: actions/checkout@v4
@@ -24,6 +27,8 @@ jobs:
           submodules: recursive
       - name: Setup Python
         uses: ./.github/actions/setup-backend/
+        with:
+          python-version: ${{ matrix.python-version }}
       - name: Enable brew and helm-docs
         # Add brew to the path - see https://github.com/actions/runner-images/issues/6283
         run: |
@@ -39,4 +44,3 @@ jobs:
             git status
             git diff
             exit 1
-          fi
diff --git a/superset/commands/distributed_lock/base.py b/superset/commands/distributed_lock/base.py
index 322063f54e..8fdb402a22 100644
--- a/superset/commands/distributed_lock/base.py
+++ b/superset/commands/distributed_lock/base.py
@@ -17,7 +17,7 @@
 
 import logging
 import uuid
-from typing import Any
+from typing import Any, Union
 
 from flask import current_app
 
@@ -34,7 +34,7 @@ class BaseDistributedLockCommand(BaseCommand):
     codec = JsonKeyValueCodec()
     resource = KeyValueResource.LOCK
 
-    def __init__(self, namespace: str, params: dict[str, Any] | None = None):
+    def __init__(self, namespace: str, params: Union[dict[str, Any], None] = None):
         self.key = get_key(namespace, **(params or {}))
 
     def validate(self) -> None: