Skip to content

Commit

Permalink
Use path read text
Browse files Browse the repository at this point in the history
  • Loading branch information
JCZuurmond committed Jun 11, 2024
1 parent 52e1eeb commit faf3c83
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/databricks/labs/lsql/dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ def create_dashboard(self, dashboard_folder: Path) -> Dashboard:

@staticmethod
def _get_text_widget(path: Path) -> Widget:
with path.open("r") as f:
widget = Widget(name=path.stem, textbox_spec=f.read())
widget = Widget(name=path.stem, textbox_spec=path.read_text())
return widget

def _get_widget(self, dataset: Dataset) -> Widget:
Expand Down

0 comments on commit faf3c83

Please sign in to comment.