Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI mods #769

Merged
merged 14 commits into from
Feb 2, 2024
Merged

UI mods #769

merged 14 commits into from
Feb 2, 2024

Conversation

emeryberger
Copy link
Member

@emeryberger emeryberger commented Feb 2, 2024

Overhaul of UI, most visibly to display profile bars at the file level and replaces most tooltips with numbers / percentages.

Screenshot 2024-02-02 at 4 03 10 PM

stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
sys.exit(0)
pass

Check warning

Code scanning / CodeQL

Unnecessary pass Warning

Unnecessary 'pass' statement.
HOST = 'localhost'
shutdown_requested = False
last_heartbeat = time.time()
server_running = True

class CustomHandler(http.server.SimpleHTTPRequestHandler):
def do_GET(self):
def do_GET(self) -> Any:

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
try:
with open(output_fname, "w", encoding="utf-8") as f:
f.write(rendered_content)
except OSError:

Check notice

Code scanning / CodeQL

Empty except Note

'except' clause does nothing but pass and there is no explanatory comment.
browser.open(scalene_gui_url)
assert not args.no_browser
dir = os.path.dirname(__file__)
import scalene.scalene_config

Check notice

Code scanning / CodeQL

Module is imported with 'import' and 'import from' Note

Module 'scalene.scalene_config' is imported with both 'import' and 'import from'.
Comment on lines +124 to +126
environment = Environment(
loader=FileSystemLoader(os.path.join(scalene_dir, "scalene-gui"))
)

Check warning

Code scanning / CodeQL

Jinja2 templating with autoescape=False Medium

Using jinja2 templates with autoescape=False can potentially allow XSS attacks.
@emeryberger emeryberger merged commit 87ebd72 into master Feb 2, 2024
14 checks passed
@emeryberger emeryberger deleted the ui_mods branch February 2, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant