https://github.com/python/cpython/commit/94c97423a9c4969f8ddd4a3aa4aacb99c4d5263d
commit: 94c97423a9c4969f8ddd4a3aa4aacb99c4d5263d
branch: main
author: Guido van Rossum <[email protected]>
committer: gvanrossum <[email protected]>
date: 2024-03-29T18:31:09Z
summary:

Fix broken format in error for bad input in summarize_stats.py (#117375)

When you pass the script a non-existent input file, you get a TypeError instead 
of the intended ValueError.

files:
M Tools/scripts/summarize_stats.py

diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py
index d40106b8682388..8dc590b4b89a88 100644
--- a/Tools/scripts/summarize_stats.py
+++ b/Tools/scripts/summarize_stats.py
@@ -114,7 +114,7 @@ def load_raw_data(input: Path) -> RawData:
         return data
 
     else:
-        raise ValueError(f"{input:r} is not a file or directory path")
+        raise ValueError(f"{input} is not a file or directory path")
 
 
 def save_raw_data(data: RawData, json_output: TextIO):

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to