Last active
February 6, 2019 17:12
-
-
Save fabiocerqueira/ff0f08c477cb89a4db750577f36a249a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [82]: stdlib = set(open("stdlib").read().split("\n")) | |
In [83]: result = set() | |
In [84]: p = Path('.') | |
In [85]: for src in p.glob('**/*.py'): | |
...: with open(src) as src_file: | |
...: code = src_file.read() | |
...: red = RedBaron(code) | |
...: result |= {node[0].dumps() for node in red.find_all("FromImportNode") + red.find_all("ImportNode")} | |
...: | |
In [86]: result - stdlib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment