Fix review issues: error handling, stdin TTY hint, narrow exceptions - Handle UnicodeDecodeError and PermissionError for file reading - Show hint when stdin is a TTY and no file given - Narrow JSON fallback exception from Exception to (SyntaxError, ValueError) - Rename 'type' parameter to 'file_type' to avoid shadowing builtin - Remove dead '.R' entry from EXTENSION_MAP

This commit is contained in:
2026-04-01 16:02:56 -07:00
parent 1abfcebc24
commit 5db15a8a17
3 changed files with 13 additions and 5 deletions

View File

@@ -40,7 +40,6 @@ EXTENSION_MAP: dict[str, str] = {
".swift": "swift",
".kt": "kotlin",
".r": "r",
".R": "r",
".lua": "lua",
".dockerfile": "docker",
".ini": "ini",