File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,14 @@ def get_app_caller_source_code_location() -> pb.SourceCodeLocation | None:
11
11
caller_info = inspect .getframeinfo (current_frame )
12
12
filename = caller_info .filename
13
13
# "mesop/mesop" is the file path of the core Mesop framework when running under bazel.
14
+ # The exception is the examples subdir, which are Mesop apps and not actually part of
15
+ # the core Mesop framework.
16
+ #
14
17
# "site-packages" is the file path of the Mesop framework when running under pip CLI.
15
18
# If the file is neither of those paths, then we assume it is an app file.
16
- if "mesop/mesop" not in filename and "site-packages" not in filename :
19
+ if (
20
+ "mesop/mesop" not in filename or "mesop/mesop/examples" in filename
21
+ ) and "site-packages" not in filename :
17
22
# Get module from filepath
18
23
splitted_file = filename .split ("runfiles/" )
19
24
if len (splitted_file ) < 2 :
You can’t perform that action at this time.
0 commit comments