1515from jinja2 import Environment , FileSystemLoader
1616from typing import Any , NewType
1717
18- import scalene . scalene_config
18+ import scalene_config
1919
2020def read_file_content (directory : str , subdirectory : str , filename : str ) -> str :
2121 file_path = os .path .join (directory , subdirectory , filename )
@@ -35,16 +35,12 @@ def launch_browser_insecure(url: str) -> None:
3535 # Create a command with the required flags
3636 chrome_cmd = f'{ chrome_path } %s --disable-web-security --user-data-dir="{ temp_dir } "'
3737
38- # print(chrome_cmd)
39-
4038 # Register the new browser type
4139 webbrowser .register ('chrome_with_flags' , None ,
4240 webbrowser .Chrome (chrome_cmd ), preferred = True )
4341
4442 # Open a URL using the new browser type
45- # url = 'https://cnn.com' # Replace with your desired URL
4643 webbrowser .get (chrome_cmd ).open (url )
47- # webbrowser.get('chrome_with_flags').open(url)
4844
4945
5046HOST = 'localhost'
@@ -133,8 +129,8 @@ def generate_html(profile_fname: Filename, output_fname: Filename) -> None:
133129 prism_js = file_contents ['prism_js_text' ],
134130 tablesort_js = file_contents ['tablesort_js_text' ],
135131 tablesort_number_js = file_contents ['tablesort_number_js_text' ],
136- scalene_version = scalene . scalene_config .scalene_version ,
137- scalene_date = scalene . scalene_config .scalene_date ,
132+ scalene_version = scalene_config .scalene_version ,
133+ scalene_date = scalene_config .scalene_date ,
138134 )
139135
140136 # Write the rendered content to the specified output file.
@@ -170,7 +166,6 @@ def start(filename: str, port: int) -> None:
170166
171167if __name__ == '__main__' :
172168 import sys
173- print (sys .argv )
174169 if len (sys .argv ) > 2 :
175170 filename = sys .argv [1 ]
176171 port = int (sys .argv [2 ])
0 commit comments