ionelmc / cookiecutter-pylibrary

Enhanced cookiecutter template for Python libraries.
BSD 2-Clause "Simplified" License
1.25k stars 207 forks source link

added spaces inbetween "python -m" and package_name templates #197

Closed honno closed 1 year ago

honno commented 4 years ago

I found two instances of python -m<package> in docstrings generated by this cookiecutter template. Note that there's no space inbetween -m and <package>! I have thus modified the corresponding template files to indeed add a space inbetween.

originally: python -m{{cookiecutter.package_name}}
       now: python -m {{cookiecutter.package_name}}

tox passed, and when using this modified cookiecutter template I did indeed see the desired whitespace :) Hope that's ok, please tell me if I'm missing something. This project has been super useful to me, so many thanks to ionelmc and all who've contributed~

honno commented 4 years ago

I noticed this was the case with two python -mpip instances, and have so fixed them too.

I didn't really think about it, but I guess without spaces works right? It just looks so janky to me personally, and was wondering if this was a used convention I was unaware of!

ionelmc commented 4 years ago

To be honest I just got used to this spaceless short options. Sometime ago pip had this nasty parsing issue in requirements.txt where you couldn't include another requirements file if you'd use -r other_reqs.txt. The workaround was -rother_reqs.txt (no spaces :)

honno commented 4 years ago

That sounds horrible haha, but yeah I now see how no-spaces is a thing and so this PR is ¯\(ツ)/¯