Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pipenv scripts command to list scripts in Pipfile #4445

Merged
merged 13 commits into from
Sep 10, 2020

Conversation

GlenRSmith
Copy link
Contributor

Enhancement discussed in #3686

@GlenRSmith GlenRSmith changed the title Add pipenv scripts command to list scripts in Pipfile Add pipenv script command to list scripts in Pipfile Aug 28, 2020
- Use string format compatible with python 2.7
- Use `click.echo`, not `print`
- The command is `pipenv script` not `pipenv scripts`
- The stanza label in Pipfile is `[scripts]`, not `[script]`
- The default when getting from the pipfile should be dict, not a list
@frostming frostming linked an issue Aug 31, 2020 that may be closed by this pull request
@frostming
Copy link
Contributor

A news fragment is needed to notice what is new. You can place it under the news/ directory, see the other files about how to write one.

@frostming frostming added the PR: awaiting-news The PR related to this issue is missing a news fragment and cannot be merged. label Aug 31, 2020
@uranusjr
Copy link
Member

uranusjr commented Sep 2, 2020

Maybe we should name this scripts instead for consistency. I misspelled [scripts] as [script] recently and spent almost half an hour wondering why my scripts don’t get picked up by Pipenv.

@GlenRSmith GlenRSmith changed the title Add pipenv script command to list scripts in Pipfile Add pipenv scripts command to list scripts in Pipfile Sep 2, 2020
Copy link
Contributor

@frostming frostming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more step before merge: add a news entry file under news/ directory. @GlenRSmith

for k, v in scripts.items():
rpt += u"{0}\t{1}".format(k, v)
echo(rpt)
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This return has no function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@GlenRSmith
Copy link
Contributor Author

@frostming Added. Sorry for the omission.

@frostming frostming merged commit c945f91 into pypa:master Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: awaiting-news The PR related to this issue is missing a news fragment and cannot be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command to list [scripts] entries
3 participants