diff options
author | Paul Moore <p.f.moore@gmail.com> | 2023-04-02 11:43:52 +0100 |
---|---|---|
committer | Paul Moore <p.f.moore@gmail.com> | 2023-04-02 11:43:52 +0100 |
commit | ffac4e461171e5fbd644c03af896ea1fd7f7df24 (patch) | |
tree | d2bfd8a8376938ef75fb11e817496c213372a3c7 /src/pip/_vendor/rich/json.py | |
parent | 141523c5ff1f0a1faf327d0e3b7b39d1ff158c49 (diff) | |
download | pip-ffac4e461171e5fbd644c03af896ea1fd7f7df24.tar.gz |
Upgrade rich to 13.3.3
Diffstat (limited to 'src/pip/_vendor/rich/json.py')
-rw-r--r-- | src/pip/_vendor/rich/json.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |