Skip to content

Commit

Permalink
Pre-commit autofixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick authored and MattiP committed May 10, 2023
1 parent 0712f1d commit 63eeea2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyinstrument/renderers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
from pyinstrument.renderers.console import ConsoleRenderer
from pyinstrument.renderers.html import HTMLRenderer
from pyinstrument.renderers.jsonrenderer import JSONRenderer
from pyinstrument.renderers.profrenderer import ProfRenderer
from pyinstrument.renderers.session import SessionRenderer
from pyinstrument.renderers.speedscope import SpeedscopeRenderer
from pyinstrument.renderers.profrenderer import ProfRenderer
2 changes: 0 additions & 2 deletions pyinstrument/renderers/profrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# pyright: strict



class ProfRenderer(FrameRenderer):
"""
Outputs a marshaled dict, containing processed frames.
Expand Down Expand Up @@ -43,7 +42,6 @@ def render_frame(self, frame: Frame | None, stats: dict) -> dict:
def render(self, session: Session):
frame = self.preprocess(session.root_frame())


stats = {}
self.render_frame(frame, stats)

Expand Down
9 changes: 8 additions & 1 deletion test/test_overflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
import pytest

from pyinstrument import Profiler
from pyinstrument.renderers import ConsoleRenderer, HTMLRenderer, JSONRenderer, SpeedscopeRenderer, ProfRenderer
from pyinstrument.renderers import (
ConsoleRenderer,
HTMLRenderer,
JSONRenderer,
ProfRenderer,
SpeedscopeRenderer,
)

# Utilities

Expand Down Expand Up @@ -61,5 +67,6 @@ def test_json(deep_profiler_session):
def test_speedscope(deep_profiler_session):
SpeedscopeRenderer().render(deep_profiler_session)


def test_prof(deep_profiler_session):
ProfRenderer().render(deep_profiler_session)
4 changes: 2 additions & 2 deletions test/test_prof_renderer.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import time
from pstats import Stats

import pytest
import time

from pyinstrument import Profiler
from pyinstrument.renderers import ProfRenderer



def a():
b()
c()
Expand Down

0 comments on commit 63eeea2

Please sign in to comment.