Skip to content

Commit 23fc78f

Browse files
perheldzingo
andauthored
Add mypy ignore for snakeviz (#15806)
Add a import-untyped for snakeviz in the case it is installed. Signed-off-by: [email protected] Change-Id: Ia951a0013d09e06c0d29a32bdb6b49ae11561d7d cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai Signed-off-by: [email protected] Co-authored-by: Zingo Andersen <[email protected]>
1 parent fee1b2d commit 23fc78f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

util/python_profiler.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (c) Meta Platforms, Inc. and affiliates.
22
# All rights reserved.
3+
# Copyright 2025 Arm Limited and/or its affiliates.
34
#
45
# This source code is licensed under the BSD-style license found in the
56
# LICENSE file in the root directory of this source tree.
@@ -12,14 +13,17 @@
1213
import re
1314
from pstats import Stats
1415

15-
from snakeviz.stats import json_stats, table_rows # type: ignore[import-not-found]
16+
from snakeviz.stats import ( # type: ignore[import-not-found,import-untyped]
17+
json_stats,
18+
table_rows,
19+
)
1620
from tornado import template # type: ignore[import-not-found]
1721

1822
module_found = True
1923
snakeviz_templates_dir: str = ""
2024

2125
try:
22-
import snakeviz # type: ignore[import-not-found]
26+
import snakeviz # type: ignore[import-not-found,import-untyped]
2327

2428
snakeviz_dir = os.path.dirname(os.path.abspath(snakeviz.__file__))
2529
snakeviz_templates_dir = os.path.join(snakeviz_dir, "templates")

0 commit comments

Comments
 (0)