From ffac4e461171e5fbd644c03af896ea1fd7f7df24 Mon Sep 17 00:00:00 2001
From: Paul Moore
Date: Sun, 2 Apr 2023 11:43:52 +0100
Subject: Upgrade rich to 13.3.3
---
src/pip/_vendor/rich/json.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/pip/_vendor/rich/json.py')
diff --git a/src/pip/_vendor/rich/json.py b/src/pip/_vendor/rich/json.py
index 21b642ab8..ea94493f2 100644
--- a/src/pip/_vendor/rich/json.py
+++ b/src/pip/_vendor/rich/json.py
@@ -1,3 +1,4 @@
+from pathlib import Path
from json import loads, dumps
from typing import Any, Callable, Optional, Union
@@ -131,8 +132,7 @@ if __name__ == "__main__":
if args.path == "-":
json_data = sys.stdin.read()
else:
- with open(args.path, "rt") as json_file:
- json_data = json_file.read()
+ json_data = Path(args.path).read_text()
except Exception as error:
error_console.print(f"Unable to read {args.path!r}; {error}")
sys.exit(-1)
--
cgit v1.2.1