Closed ronaldoussoren closed 11 years ago
I like the idea. A test would be nice before merging.
I have little experience with hg/git issues on Github and I always have to lookup in the documentation how to push. If you have git installed locally you could use it for this one commit:
git commit -a -m "Check all packages for a PyPI user"
git push
Also Github has formatted your code very poorly. If you copy your diff into a code editor and indent it 4 spaces before copy-pasting it again, it will format it much better.
The patch below adds a '-u user' option that can be used to check all packages where a pypi user has a role.
NOTE: The patch is missing tests and a documentation update mostly because I haven't gotten around to that yet. It is a inline patch instead of a pull request because for some reason hg won't push to my github fork of this project.
diff --git a/pep438/main.py b/pep438/main.py --- a/pep438/main.py +++ b/pep438/main.py @@ -2,6 +2,7 @@ from future import print_function, unicode_literals import sys from getopt import getopt, GetoptError +import xmlrpclib
from clint import piped_in from clint.textui import puts, columns, indent @@ -36,6 +37,10 @@ for option, description in options: puts(columns([option, max_len + 5], [description, 99]), stream=out)
+def get_pypi_user_packages(user):
return [x[1] for x in client.user_packages(user)] +
def process_options(options): """Returns given package names or prints help, version, or usage info""" @@ -50,6 +55,9 @@ if option == '-r': with open(arg) as f: packages += get_pypi_packages(f)
@@ -60,7 +68,7 @@ input_lines = None and piped_in()