From d5ac2f53d3f6ed2da9b2c692f991b157c0fed6ba Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 22 May 2024 14:22:09 -0400 Subject: [PATCH] Improve display of interpreter implementation names (#3749) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit e.g. instead of ``` ❯ uv venv --python pypy@3.10 × No interpreter found for pypy 3.10 in search path ``` we say ``` ❯ uv venv --python pypy@3.10 × No interpreter found for PyPy 3.10 in search path ``` --- crates/uv-interpreter/src/implementation.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/uv-interpreter/src/implementation.rs b/crates/uv-interpreter/src/implementation.rs index a5eb28cda..d63f06d21 100644 --- a/crates/uv-interpreter/src/implementation.rs +++ b/crates/uv-interpreter/src/implementation.rs @@ -46,6 +46,9 @@ impl FromStr for ImplementationName { impl Display for ImplementationName { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.as_str()) + match self { + Self::CPython => f.write_str("CPython"), + Self::PyPy => f.write_str("PyPy"), + } } }