Skip to content

Commit

Permalink
Path(file_name).read_text()
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Arellano <[email protected]>
  • Loading branch information
1ucian0 and Eric-Arellano committed Jul 4, 2023
1 parent 033ea64 commit 1ecc5af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/find_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ def group_by(self, attribute_idx: str) -> None:
@staticmethod
def find_deprecations(file_name: Path) -> list[Deprecation]:
"""Runs the deprecation finder on file_name"""
with open(file_name, encoding="utf-8") as fp:
code = fp.read()
code = Path(file_name).read_text()
mod = ast.parse(code, file_name)
decorator_visitor = DecoratorVisitor(file_name)
decorator_visitor.visit(mod)
Expand Down

0 comments on commit 1ecc5af

Please sign in to comment.