File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,11 @@ class Scalene:
152152 # the pid of the primary profiler
153153 __parent_pid = - 1
154154 __initialized : bool = False
155- __last_profiled : list [Filename | LineNumber | ByteCodeIndex ] = [Filename ("NADA" ), LineNumber (0 ), ByteCodeIndex (0 )]
155+ __last_profiled : list [Filename | LineNumber | ByteCodeIndex ] = [
156+ Filename ("NADA" ),
157+ LineNumber (0 ),
158+ ByteCodeIndex (0 ),
159+ ]
156160 __orig_python = sys .executable # will be rewritten later
157161
158162 __profile_filename = Filename ("scalene-profile.json" )
@@ -1385,10 +1389,16 @@ def profile_code(
13851389
13861390 pywhere .populate_struct ()
13871391 # Set legacy tracer mode if requested via command line
1388- if hasattr (Scalene .__args , "use_legacy_tracer" ) and Scalene .__args .use_legacy_tracer :
1392+ if (
1393+ hasattr (Scalene .__args , "use_legacy_tracer" )
1394+ and Scalene .__args .use_legacy_tracer
1395+ ):
13891396 set_use_legacy_tracer (True )
13901397 # Set Python callback mode if requested via command line (disables C callback)
1391- if hasattr (Scalene .__args , "use_python_callback" ) and Scalene .__args .use_python_callback :
1398+ if (
1399+ hasattr (Scalene .__args , "use_python_callback" )
1400+ and Scalene .__args .use_python_callback
1401+ ):
13921402 set_use_python_callback (True )
13931403 # Initialize the tracer for sys.monitoring support (Python 3.12+)
13941404 initialize_tracer (
You can’t perform that action at this time.
0 commit comments