pypa / hatch

Modern, extensible Python project management
https://hatch.pypa.io/latest/
MIT License
5.83k stars 288 forks source link

Unfortunate default environments display in narrow terminals #1616

Open Midnighter opened 1 month ago

Midnighter commented 1 month ago

When running hatch env show in a narrow terminal, I got the following output. I think the default focuses on the wrong columns. I definitely always want to see the Name column.

                                          Standalone
┏┳┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━┳┓
┃┃┃ Dependencies            ┃ Environment variables                                      ┃ … ┃┃
┡╇╇━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━╇┩
│││                         │                                                            │   ││
├┼┼─────────────────────────┼────────────────────────────────────────────────────────────┼───┼┤
│││ dagster-webserver~=1.7  │ DAGSTER_HOME=/home/my/very/long/absolute/project/path…     │ … ││
├┼┼─────────────────────────┼────────────────────────────────────────────────────────────┼───┼┤
│││ pydoclint               │                                                            │ … ││
│││ ruff                    │                                                            │ … ││
│││                         │                                                            │ … ││
├┼┼─────────────────────────┼────────────────────────────────────────────────────────────┼───┼┤
│││ safety                  │                                                            │ … ││
├┼┼─────────────────────────┼────────────────────────────────────────────────────────────┼───┼┤
│││ mypy                    │                                                            │ … ││
├┼┼─────────────────────────┼────────────────────────────────────────────────────────────┼───┼┤
│││ mkdocs-awesome-pages-p… │                                                            │ … ││
│││ mkdocs-material~=9.5    │                                                            │ … ││
│││ mkdocstrings[python]~=… │                                                            │   ││
├┼┼─────────────────────────┼────────────────────────────────────────────────────────────┼───┼┤
│││ pip                     │                                                            │ … ││
│││ twine                   │                                                            │   ││
└┴┴─────────────────────────┴────────────────────────────────────────────────────────────┴───┴┘
ofek commented 1 month ago

the output definitely sucks, sorry about that. do you have any idea if the issue is with code here or in Rich?

Midnighter commented 1 month ago

If you haven't done anything special, my guess is rich.