show the file when listing requirements

include the file where the requirement was specified so we can tell
whether the dependency is for testing, python 3, etc.
This commit is contained in:
Doug Hellmann 2014-11-06 16:03:41 +01:00
parent 74575576c5
commit 39d04454ee
1 changed files with 3 additions and 2 deletions

View File

@ -29,8 +29,9 @@ class List(Lister):
models.Project.name == parsed_args.project
)
proj_obj = query.one()
return (('Name', 'Spec'),
((r.name, r.line.content.strip()) for r in proj_obj.requirements))
return (('Name', 'Spec', 'File'),
((r.name, r.line.content.strip(), r.line.file.name)
for r in proj_obj.requirements))
class Uses(Lister):