Skip to content

Commit

Permalink
Fix Path operation
Browse files Browse the repository at this point in the history
  • Loading branch information
ubmarco committed Sep 1, 2023
1 parent 8348bf4 commit 18ca8f9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sphinx_performance/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def cli_analysis(
).render(
json_str,
)
with Path.open(Path("pyinstrument_profile.html"), "w") as events_json_file:
with Path("pyinstrument_profile.html").open("w") as events_json_file:
events_json_file.write(html_data)
webbrowser.open_new_tab("pyinstrument_profile.html")

Expand All @@ -287,10 +287,7 @@ def cli_analysis(

json_obj = json.loads(json_str)
aggregate_json = aggregate_event_runtime(json_obj)
with Path.open(
Path("pyinstrument_sphinx_events.json"),
"w",
) as events_json_file:
with Path("pyinstrument_sphinx_events.json").open("w") as events_json_file:
json.dump(aggregate_json, events_json_file, indent=2, sort_keys=True)

if flamegraph:
Expand Down

0 comments on commit 18ca8f9

Please sign in to comment.