posit-dev / publisher

MIT License
5 stars 0 forks source link

Look at .python-version during inspection #971

Open mmarchetti opened 9 months ago

mmarchetti commented 9 months ago

Init should look for a .python-version file wirten by pyenv (docs) as an alternative to running Python to get the version.

mmarchetti commented 7 months ago

Note that this happens already IF you are using pyenv, because python on your PATH is the pyenv shim, and it looks at the .python-version file. But, if you get a bundle/repo from someone else who uses pyenv, and you don't, the file won't do anything during inspection. (Maybe that's correct? since you have whatever python version you have locally, and that will be reflected in the configurations you create).