summaryrefslogtreecommitdiff
path: root/tools/perf/python
diff options
context:
space:
mode:
authorLeo Yan <leo.yan@arm.com>2026-10-23 14:20:25 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-11-07 17:31:37 -0300
commitf88e617ea4590d80e4a144c69d6326c04fe2a357 (patch)
treedcee1ae55f88bbb92b78710b8cecfd1acb0240e2 /tools/perf/python
parent1b0935ab5ac2e31ee0c2641d2b58b4af3db68a7a (diff)
downloadlinux-next-f88e617ea4590d80e4a144c69d6326c04fe2a357.tar.gz
linux-next-f88e617ea4590d80e4a144c69d6326c04fe2a357.zip
perf timechart: Initialize Textual attributes in constructors
When Textual is unavailable, pylint cannot resolve the inherited virtual_size and sub_title attributes, which triggers pylint warnings and caused arm64 cross build failure: ************* Module ttimechart python/ttimechart.py:1086:8: W0201: Attribute 'virtual_size' defined outside __init__ (attribute-defined-outside-init) python/ttimechart.py:1422:12: W0201: Attribute 'sub_title' defined outside __init__ (attribute-defined-outside-init) python/ttimechart.py:1496:8: W0201: Attribute 'sub_title' defined outside __init__ (attribute-defined-outside-init) python/ttimechart.py:1510:8: W0201: Attribute 'sub_title' defined outside __init__ (attribute-defined-outside-init) Initialize both attributes in their respective constructors. Use Textual's default empty virtual size, with the actual geometry computed when the timeline mounts or resizes. Fixes: e7a72d6919804e5e ("perf timechart: Add an interactive --tui mode") Signed-off-by: Leo Yan <leo.yan@arm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Aishwarya TCV <aishwarya.tcv@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alice Rogers <alice.mei.rogers@gmail.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/python')
-rwxr-xr-xtools/perf/python/ttimechart.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/python/ttimechart.py b/tools/perf/python/ttimechart.py
index d7ba0276a9fb..2ec7ad9fcc99 100755
--- a/tools/perf/python/ttimechart.py
+++ b/tools/perf/python/ttimechart.py
@@ -1065,6 +1065,7 @@ class TimelineView(ScrollView):
self.can_focus = True
self.data = data
self.rows = rows
+ self.virtual_size = Size(0, 0)
self.cache: Dict[int, List[Cell]] = {}
self.cache_key: Tuple[float, float, int, Optional[ThemeColors]] = (0.0, 0.0, 0, None)
self.label_style = Style()
@@ -1332,6 +1333,7 @@ class TimechartApp(App):
"""
super().__init__()
self.input_name = input_name
+ self.sub_title = input_name
self.power_only = power_only
self.tasks_only = tasks_only
self.filters = filters