korbit-ai[bot] commented on code in PR #33849: URL: https://github.com/apache/superset/pull/33849#discussion_r2159576212
########## 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", + } Review Comment: ### Incorrect path patterns prevent valid imports <sub></sub> <details> <summary>Tell me more</summary> ###### What is the issue? The allowed paths contain 'supersql' instead of 'superset' in the first two patterns, which will incorrectly prevent valid imports in the superset/sql directory. ###### Why this matters This typo will cause the linter to flag legitimate sqlglot imports within the superset/sql directory as violations, contradicting the intended functionality described in the code comment. ###### Suggested change ∙ *Feature Preview* ```python allowed = { "**/superset/sql/**/*.py", "**/superset/sql/*.py", "**/superset/config.py", } ``` ###### Provide feedback to improve future suggestions [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ea9fff76-64b5-48a1-b3ff-c2492ad7c1da/upvote) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ea9fff76-64b5-48a1-b3ff-c2492ad7c1da?what_not_true=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ea9fff76-64b5-48a1-b3ff-c2492ad7c1da?what_out_of_scope=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ea9fff76-64b5-48a1-b3ff-c2492ad7c1da?what_not_in_standard=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ea9fff76-64b5-48a1-b3ff-c2492ad7c1da) </details> <sub> 💬 Looking for more details? Reply to this comment to chat with Korbit. </sub> <!--- korbi internal id:87eb90a7-fea2-421d-b0a6-0667243b5c00 --> [](87eb90a7-fea2-421d-b0a6-0667243b5c00) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org