Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodd committed Sep 10, 2023
1 parent fc82209 commit 1a93618
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lineprofilergui/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ def load_code(self):
# is a chance that the correct version was in cache and we get
# the correct lines.
all_lines = linecache.getlines(self.filename)
self.code_lines = inspect.getblock(
all_lines[self.start_line_no :]
)
self.code_lines = inspect.getblock(all_lines[self.start_line_no :])

def parse_stats(self, stats):
self.line_data = []
Expand Down Expand Up @@ -97,7 +95,9 @@ def color(self):
red = color.redF()
green = color.greenF()
blue = color.blueF()
perceived_luminance = math.sqrt(0.241 * red ** 2 + 0.691 * green ** 2 + 0.068 * blue ** 2)
perceived_luminance = math.sqrt(
0.241 * red**2 + 0.691 * green**2 + 0.068 * blue**2
)
perceived_luminance /= 0.642 # Normalize to stay inside the RGB range
return QtGui.QColor.fromRgbF(
red / perceived_luminance,
Expand Down

0 comments on commit 1a93618

Please sign in to comment.