Skip to content

Commit 918ebdb

Browse files
khvn26emyller
andcommitted
use Path.read_text
Co-authored-by: Evandro Myller <[email protected]>
1 parent fdb8e75 commit 918ebdb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/scripts/add-known-sdk-version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import argparse
22
import typing
3+
from pathlib import Path
34

45
import libcst as cst
56
from libcst.codemod import (
@@ -129,7 +130,7 @@ def main() -> None:
129130
sdk=args.sdk,
130131
version=args.version,
131132
)
132-
code = open(MODULE_PATH).read()
133+
code = Path(MODULE_PATH).read_text()
133134
if result := exec_transform_with_prettyprint(
134135
codemod,
135136
code,

0 commit comments

Comments
 (0)