We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85f8baa commit 748ea2dCopy full SHA for 748ea2d
scripts/check_imports.py
@@ -0,0 +1,27 @@
1
+"""
2
+Check that certain modules are not loaded by `import pandas`
3
4
+import sys
5
+
6
7
+blacklist = {
8
+ 'matplotlib',
9
+ 'numexpr',
10
+ 'xlsxwriter',
11
+ 'openpyxl',
12
+ 'xlwt',
13
14
+}
15
16
17
+def main():
18
+ import pandas # noqa
19
20
+ modules = set(x.split('.')[0] for x in sys.modules)
21
+ imported = modules & blacklist
22
+ if modules & blacklist:
23
+ sys.exit("Imported {}".format(imported))
24
25
26
+if __name__ == '__main__':
27
+ main()
0 commit comments