Open mattjegan opened 7 years ago
I think the most useful thing for the user would be to trim the leading and trailing whitespace.
@hugovk Sounds good, @killVung brought this up so perhaps they could handle it? If not, I'm happy to.
The worst part is that you would never the string client passed in. What if they passed something like vanity "But sometimes I need somebody to makes me feel alright"
I would assume that should get caught when the call is made to get the downloads statistics seeing as it is _most probably_ not a package name. But would we want vanity "flask django"
to return the same output as vanity flask django
?
I tried to submit a package with spaces in the name on the https://testpypi.python.org/pypi?%3Aaction=submit_form test site and it said:
Error processing form
Invalid package name. Names must contain only ASCII letters, digits, underscores, hyphens, and periods
So I'd say it's safe to split whitespace into separate packages.
e.g.
vanity " Flask "
outputs same as vanity Flask
vanity "flask django"
outputs same as vanity flask django
Motivated by @killVung in #33
Currently, vanity results with the following given quoted input:
This should either, interpret the input as
vanity flask
or raise an error. I think either course of action would be fine, however PEP8 - Package and Module Names eludes to the existence of whitespace in a package name, so perhaps this should be treated as improper input and result in an error.