DataDog / riot

A Python virtual env builder and command runner
https://ddriot.readthedocs.io/
Apache License 2.0
23 stars 15 forks source link

feat: add interpreters flag to riot list command #190

Closed Yun-Kim closed 2 years ago

Yun-Kim commented 2 years ago

This change adds a -i, --interpreters flag to the riot list command. If set to true, this flag should cause the riot list command to output a list of unique python interpreters for each matching venv instead of the overall table that the default command generates.

Example:

(.venv) riot % riot list test
No.  Hash     Name  Interpreter                Environment  Packages                                                        
 #0   51feb80  test  Interpreter(_hint='3.6')   --           'pytest' 'pytest-cov' 'pytest-xdist' 'mock' 'typing-extensions' 
 #1   8498bd5  test  Interpreter(_hint='3.7')   --           'pytest' 'pytest-cov' 'pytest-xdist' 'mock' 'typing-extensions' 
 #2   1afefb9  test  Interpreter(_hint='3.8')   --           'pytest' 'pytest-cov' 'pytest-xdist' 'mock' 'typing-extensions' 
 #3   e78d3c6  test  Interpreter(_hint='3.9')   --           'pytest' 'pytest-cov' 'pytest-xdist' 'mock' 'typing-extensions' 
 #4   dbf03ce  test  Interpreter(_hint='3.10')  --           'pytest' 'pytest-cov' 'pytest-xdist' 'mock' 'typing-extensions'
(.venv)  riot % riot list --interpreters test
3.6,3.7,3.8,3.9,3.10