treyhunner / pep438

Check packages in your requirements.txt file for good PEP 438 usage
MIT License
14 stars 6 forks source link

check all packages for a pypi user #6

Closed ronaldoussoren closed 11 years ago

ronaldoussoren commented 11 years ago

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):

@@ -60,7 +68,7 @@ input_lines = None and piped_in()

 try:
treyhunner commented 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.