-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add pylint rule for SQL importing (SIP-117) #26803
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #26803 +/- ##
==========================================
+ Coverage 67.16% 69.47% +2.30%
==========================================
Files 1894 1895 +1
Lines 74176 74196 +20
Branches 8243 8243
==========================================
+ Hits 49820 51546 +1726
+ Misses 22287 20581 -1706
Partials 2069 2069
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for adding this @betodealmeida. As part of SIP-99 I was hoping to do something similar to prevent the use of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woot! The new check found examples of invalid imports. Once these have been resolved this LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! ❤️
I love that I can't merge this PR because of the rule it adds. 😆 I hope to be able to merge this soon... |
Is this mergeable now? Closing/reopening to kick-start CI, though it probably needs a rebase. |
SUMMARY
Pylint rule to prevent Superset from importing SQL parsing libraries outside of
superset/sql_parse.py
. Should be merged once #26786 has been completed.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
$ pylint --reports=no --score=no --disable=all --enable=C9999 superset/db_engine_specs/base.py ************* Module superset.db_engine_specs.base superset/db_engine_specs/base.py:38:0: C9999: Disallowed SQL parsing import used (disallowed-import) $ pylint --reports=no --score=no --disable=all --enable=C9999 superset/sql_parse.py $
ADDITIONAL INFORMATION