Open qarmin opened 4 months ago
Uff, that took me a while to figure out myself. You can use ruff version
to get the commit number (doesn't work for local builds).
Yeah we added this in https://github.com/astral-sh/ruff/pull/8034
As mentioned there, we could include this for the -V
/ --version
flag. We didn't change it initially to avoid a breaking change for tools that parse the output. I think we should change this to match the uv
behavior which is as follows:
❯ uv -V
uv 0.2.3
❯ uv --version
uv 0.2.3 (ce4d862b0 2024-05-24)
❯ uv version
uv 0.2.3 (ce4d862b0 2024-05-24)
I would instead follow the same behavior as python which output the build info when --version
(or -V
) is provided twice. https://docs.python.org/3/using/cmdline.html#cmdoption-version
❯ python3 --version
Python 3.11.7
❯ python3 --version --version
Python 3.11.7 (main, Dec 18 2023, 10:50:03) [Clang 15.0.0 (clang-1500.1.0.2.5)]
Currently git version of app, always for
ruff --version
prints something likeI think that here could be added more info like
e.g.