Created
July 25, 2014 15:01
-
-
Save DoctorMalboro/8ede58465fe9ca73c4c3 to your computer and use it in GitHub Desktop.
Checks if there are any unused imports on your project. Requires snake-food to work.
This file contains 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
# -*- coding: utf-8 -*- | |
import subprocess | |
if __name__ == '__main__': | |
fp = open('imports.txt', 'w+') | |
imports = subprocess.Popen('sfood-checker', | |
shell=True, | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.STDOUT) | |
imports_output = imports.communicate()[0] | |
fp.write(imports_output) | |
fp.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment