Skip to content

Expand Pylint rule rollout - #31

Merged
ainetx merged 2 commits into
mainfrom
pylint
Jun 13, 2026
Merged

Expand Pylint rule rollout#31
ainetx merged 2 commits into
mainfrom
pylint

Conversation

@ainetx

@ainetx ainetx commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Enable additional Pylint rules to improve code quality and maintainability. Update the configuration to reflect the staged rollout strategy and enhance file handling in the codebase.

Summary by CodeRabbit

  • Documentation

    • Updated contribution guidelines regarding CI pipeline configuration.
  • Chores

    • Enhanced code quality checks configuration with expanded lint rules.
    • Improved file operations with explicit UTF-8 encoding.
    • Refactored internal code and removed redundant statements for better maintainability.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f6603334-b56b-4365-a0b6-76cd30e37f10

📥 Commits

Reviewing files that changed from the base of the PR and between f61e339 and 13570a3.

⛔ Files ignored due to path filters (3)
  • .bootstrap/.cache/brainstorm/pylint-rule-rollout-20260613T125348Z/design.md is excluded by !**/.cache/**
  • .bootstrap/.cache/brainstorm/pylint-rule-rollout-20260613T125348Z/panel-round-1.json is excluded by !**/.cache/**
  • .bootstrap/.cache/brainstorm/pylint-rule-rollout-20260613T125348Z/state.json is excluded by !**/.cache/**
📒 Files selected for processing (8)
  • CONTRIBUTING.md
  • pyproject.toml
  • skills/studio/scripts/studio/commands/map/layout.py
  • skills/studio/scripts/studio/commands/map/links.py
  • skills/studio/scripts/studio/ralphex_export.py
  • skills/studio/scripts/studio/utils/manifest.py
  • skills/studio/scripts/studio/utils/toml_utils.py
  • skills/studio/scripts/studio/utils/ui.py
💤 Files with no reviewable changes (1)
  • skills/studio/scripts/studio/utils/manifest.py
✅ Files skipped from review due to trivial changes (5)
  • pyproject.toml
  • skills/studio/scripts/studio/commands/map/layout.py
  • CONTRIBUTING.md
  • skills/studio/scripts/studio/utils/toml_utils.py
  • skills/studio/scripts/studio/ralphex_export.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/studio/scripts/studio/utils/ui.py
  • skills/studio/scripts/studio/commands/map/links.py

📝 Walkthrough

Walkthrough

This PR expands Pylint's enabled message codes in project configuration, refactors a file link edge helper to improve code reuse, standardizes UTF-8 file encoding across multiple modules, simplifies verbose logging statements, and removes redundant code from dataclass definitions.

Changes

Code Quality and Configuration Updates

Layer / File(s) Summary
Pylint configuration expansion and documentation
pyproject.toml, CONTRIBUTING.md
Pylint enabled message codes expanded to include broad E category and extensive W-series codes; CONTRIBUTING.md updated to reference pyproject.toml for staged rollout configuration.
File link edge extraction refactoring
skills/studio/scripts/studio/commands/map/links.py
extract_file_links refactored to extract edge-append logic into _append_file_link_edge helper, consolidating target validation, line computation, and edge construction, with explicit edge_id increment via return value.
Layout verbose logging simplification
skills/studio/scripts/studio/commands/map/layout.py
Verbose logging in compute_layout switches from formatted f-strings to plain string literals for category repack and affinity layout decision output.
UTF-8 encoding consistency and code cleanup
skills/studio/scripts/studio/ralphex_export.py, skills/studio/scripts/studio/utils/toml_utils.py, skills/studio/scripts/studio/utils/manifest.py, skills/studio/scripts/studio/utils/ui.py
File opens in ralphex_export.py and toml_utils.py now specify UTF-8 encoding explicitly; redundant pass statements removed from manifest dataclasses; unnecessary f-string prefix removed from ui.py warning message.

🎯 2 (Simple) | ⏱️ ~10 minutes


🐰 A hop through the code so clean and bright,
With UTF-8 paths and Pylint rules right,
Link edges extracted with helper delight,
Logging logs plainly, oh what a sight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Expand Pylint rule rollout' directly and concisely summarizes the main change: expanding Pylint rules through a staged rollout strategy, which is reflected in the primary modification to pyproject.toml.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pylint

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/studio/scripts/studio/utils/toml_utils.py`:
- Line 255: Remove the invalid Ruff noqa marker on the open call (the comment "#
noqa: WPS515" following the statement `fh = open(lock_file, "a",
encoding="utf-8")`); either delete that trailing noqa comment so the line is
simply `fh = open(lock_file, "a", encoding="utf-8")`, or if you intentionally
need to silence an external rule, add the rule source to Ruff's lint.external in
ruff.toml to allow WPS515 — do not keep the invalid `# noqa: WPS515` token in
the code.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 08a52bc0-080d-46e4-8651-e69c8cc543f8

📥 Commits

Reviewing files that changed from the base of the PR and between b2c5b2a and f61e339.

⛔ Files ignored due to path filters (3)
  • .bootstrap/.cache/brainstorm/pylint-rule-rollout-20260613T125348Z/design.md is excluded by !**/.cache/**
  • .bootstrap/.cache/brainstorm/pylint-rule-rollout-20260613T125348Z/panel-round-1.json is excluded by !**/.cache/**
  • .bootstrap/.cache/brainstorm/pylint-rule-rollout-20260613T125348Z/state.json is excluded by !**/.cache/**
📒 Files selected for processing (9)
  • .bootstrap/version.toml
  • CONTRIBUTING.md
  • pyproject.toml
  • skills/studio/scripts/studio/commands/map/layout.py
  • skills/studio/scripts/studio/commands/map/links.py
  • skills/studio/scripts/studio/ralphex_export.py
  • skills/studio/scripts/studio/utils/manifest.py
  • skills/studio/scripts/studio/utils/toml_utils.py
  • skills/studio/scripts/studio/utils/ui.py
💤 Files with no reviewable changes (1)
  • skills/studio/scripts/studio/utils/manifest.py

Comment thread skills/studio/scripts/studio/utils/toml_utils.py Outdated
ainetx and others added 2 commits June 13, 2026 16:38
Signed-off-by: ainetx <viator@via-net.org>
Co-authored-by: Constructor Studio <291158726+constructor-studio[bot]@users.noreply.github.com>
Studio-Generated-By: Constructor Studio
Studio-Source-Repo: https://github.com/constructorfabric/studio
Constructor-Fabric: https://github.com/constructorfabric
Studio-Workflows: cf-coding
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant