You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2025/06/20 19:43:49 UTC

(superset) branch fix-sqlglot-linter created (now 47e5772648)

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

beto pushed a change to branch fix-sqlglot-linter
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 47e5772648 fix: sqlglot linter

This branch includes the following new commits:

     new 47e5772648 fix: sqlglot linter

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: sqlglot linter

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

beto pushed a commit to branch fix-sqlglot-linter
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 47e5772648b9a751d4e9fe8b9f0e7b2153e652ef
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Fri Jun 20 12:43:38 2025 -0700

    fix: sqlglot linter
---
 superset/extensions/pylint.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/superset/extensions/pylint.py b/superset/extensions/pylint.py
index deb0c86572..fc177884da 100644
--- a/superset/extensions/pylint.py
+++ b/superset/extensions/pylint.py
@@ -87,9 +87,12 @@ class SQLParsingLibraryImportChecker(BaseChecker):
     def _is_disallowed(self, file_path: Path, root_mod: str) -> bool:
         # True if sqlglot is imported outside superset/sql,
         # or if any forbidden library is imported anywhere
-        in_superset_sql = file_path.match("**/superset/sql/**/*.py") or file_path.match(
-            "**/superset/sql/*.py"
-        )
+        allowed = {
+            "**/supersql/sql/**/*.py",
+            "**/supersql/sql/*.py",
+            "**/superset/config.py",
+        }
+        in_superset_sql = any(file_path.match(pattern) for pattern in allowed)
         return (root_mod == "sqlglot" and not in_superset_sql) or root_mod in {
             "sqlparse",
             "sqloxide",