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

aminghadersohi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new f1ae8909d85 fix(import): remove duplicate config redefinition in 
load_configs (#44932)
f1ae8909d85 is described below

commit f1ae8909d85f9c8ff39e834a9eee00f88f2aa32d
Author: Evan Rusackas <[email protected]>
AuthorDate: Sat Oct 3 00:53:57 2026 -0700

    fix(import): remove duplicate config redefinition in load_configs (#44932)
    
    Co-authored-by: Claude Sonnet 5 <[email protected]>
---
 superset/commands/importers/v1/utils.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/superset/commands/importers/v1/utils.py 
b/superset/commands/importers/v1/utils.py
index 6c9349702c5..484daf768f1 100644
--- a/superset/commands/importers/v1/utils.py
+++ b/superset/commands/importers/v1/utils.py
@@ -192,14 +192,13 @@ def load_configs(
         if not content:
             continue
 
+        # Bound up front so the ``except ValidationError`` diagnostic below
+        # stays valid even when ``load_yaml`` raises before the assignment
+        # completes (unparseable YAML).
         config: dict[str, Any] | None = None
         prefix = file_name.split("/")[0]
         schema = schemas.get(f"{prefix}/")
         if schema:
-            # Bind ``config`` up front so the ``except ValidationError``
-            # diagnostic below stays valid even when ``load_yaml`` raises
-            # before the assignment completes (unparseable YAML).
-            config: Any = None
             try:
                 config = load_yaml(file_name, content)
                 if not isinstance(config, dict):

Reply via email to