pypa / hatch

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

Unfortunate default environments display in narrow terminals #1616

Open Midnighter opened 3 months ago

Midnighter commented 3 months 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 3 months 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 3 months ago

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