Skip to content

Refactor quicklook msg_curse to reduce cyclomatic complexity#3477

Open
wavebyrd wants to merge 6039 commits intonicolargo:developfrom
wavebyrd:reduce-complexity-quicklook-msg-curse
Open

Refactor quicklook msg_curse to reduce cyclomatic complexity#3477
wavebyrd wants to merge 6039 commits intonicolargo:developfrom
wavebyrd:reduce-complexity-quicklook-msg-curse

Conversation

@wavebyrd
Copy link
Copy Markdown

Summary

Reduces the cyclomatic complexity of msg_curse in glances/plugins/quicklook/__init__.py from 20 down to 7 by extracting four focused helper methods:

  • _build_freq_msg(): builds the CPU frequency display string
  • _build_cpu_name_msg(): builds the CPU name display string
  • _build_data_widgets(): creates Bar or Sparkline widgets for each stat key
  • _populate_stat_data(): populates a widget with sparkline history or bar value

No behavioral changes. All existing logic and output is preserved.

Part of #3460.

drake7707 and others added 30 commits December 15, 2025 07:57
Include GTT to mem% for integrated AMD GPUs
License classifiers have been superseded by license expressions (see https://peps.python.org/pep-0639/).
Detailed changes:
- Enable autoescape=True for Jinja2 environment to prevent XSS (B701).
- Add timeout=15s to requests.get in nginx amp (B113).
- Add timeout=15s to post in restful export (B113).
…ty-bandit

fix(security): resolve B701 (Jinja2) and B113 (timeout) vulnerabilities
Update license specification to SPDX format
Fix quicklook in case psutil.cpu_freq().max=0.0
nicolargo and others added 28 commits March 4, 2026 16:15
Added installation instructions for Glances using UVx.
…hub.com:sdoshi2061/glances into sdoshi2061-mem-plugin_e8a559ce-ab5b-4674-91e2-9c4f42636da2
Unauthenticated Configuration Secrets Exposure
SQL Injection via Process Names in TimescaleDB Export
Updated security patch descriptions with correct CVE identifiers.
@wavebyrd wavebyrd force-pushed the reduce-complexity-quicklook-msg-curse branch from ab64937 to ba162c6 Compare March 13, 2026 21:23
@nicolargo
Copy link
Copy Markdown
Owner

Sorry @wavebyrd but i can not review a PR with more than 600 files modified (perhaps a format/lint issue in your dev environment (https://github.com/nicolargo/glances/wiki/How-to-contribute-to-Glances-%3F).

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.