chore: upgrade dependencies and replace black with ruff formatter#92
chore: upgrade dependencies and replace black with ruff formatter#92Prashant-Surya merged 2 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughRepository formatting and tooling switched from Black to Ruff (line-length 100→120), new runtime deps added (PyJWT, authlib), and many client call sites and minor messages were reformatted; no public APIs or functional behavior were changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
plane_mcp/tools/work_item_relations.py (1)
71-71: Optional: use a single f-string for readability.This works, but one f-string is cleaner than adjacent literals.
♻️ Suggested cleanup
- f"Invalid relation_type '{relation_type}'. " f"Must be one of: {get_args(WorkItemRelationTypeEnum)}" + f"Invalid relation_type '{relation_type}'. Must be one of: {get_args(WorkItemRelationTypeEnum)}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plane_mcp/tools/work_item_relations.py` at line 71, The two adjacent f-strings used in the error message should be combined into a single f-string for readability; update the code that constructs the invalid relation_type error message (the expression using relation_type and get_args(WorkItemRelationTypeEnum)) to use one f-string that includes both the descriptive text and the interpolated values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@plane_mcp/auth/plane_oauth_provider.py`:
- Line 128: The log at verify_token (in plane_oauth_provider.py) prints part of
the bearer token; remove any logging of token content and replace it with a
non-sensitive indicator (e.g., log that verify_token was called and whether a
token was provided or its masked length like "token_provided=True" or
"token_present" without emitting characters). Update the logger.info line in the
verify_token function (and any similar statements) to avoid printing token[:20]
and instead use a safe placeholder or boolean so no token fragments appear in
logs.
In `@plane_mcp/client.py`:
- Line 40: The base_url assignment in variable base_url using
os.getenv("PLANE_INTERNAL_BASE_URL") or os.getenv("PLANE_BASE_URL",
"https://api.plane.so") exceeds the 100-char line length; reformat it to satisfy
Black/100-char rules by wrapping the expression in parentheses and breaking
across lines (preserving the preference for PLANE_INTERNAL_BASE_URL and the
fallback to PLANE_BASE_URL with the default "https://api.plane.so") so the logic
in client.py remains identical but fits the line-length policy.
In `@plane_mcp/tools/cycles.py`:
- Line 105: The single-line condensed client call "return
client.cycles.retrieve(workspace_slug=workspace_slug, project_id=project_id,
cycle_id=cycle_id)" violates the repo formatting policy; reformat this and the
other condensed client calls to a multi-line call so each argument is on its own
line (e.g., break the arguments workspace_slug, project_id, cycle_id onto
separate lines), and run Black/ruff with max-line-length=100 to ensure
compliance; locate occurrences by searching for client.cycles.retrieve and
similar one-line client calls in this file and apply the same multiline style.
In `@plane_mcp/tools/epics.py`:
- Line 146: The single-line call to client.work_items.create exceeds the
100-char limit; update the call to span multiple lines using implicit line
continuation (wrap the arguments in parentheses) so the call to
client.work_items.create(...) is split across lines, placing each argument
(workspace_slug=workspace_slug, project_id=project_id, data=data) on its own
line and keeping the assignment to work_item on a separate line so the statement
complies with the repository's black/100-char formatting.
In `@plane_mcp/tools/initiatives.py`:
- Line 35: The single-line call creating the PaginatedInitiativeResponse exceeds
the 100-char limit; update the statement that assigns response:
PaginatedInitiativeResponse =
client.initiatives.list(workspace_slug=workspace_slug, params=params) (and the
similar call around line 133) to a Black-style wrapped form so each argument is
on its own line (e.g., break after the method name and put workspace_slug=...
and params=... on separate indented lines), preserving the same identifiers
(client.initiatives.list, workspace_slug, params, PaginatedInitiativeResponse)
and ensuring line length stays ≤100 characters.
In `@plane_mcp/tools/intake.py`:
- Line 67: The single-line call to client.intake.create with workspace_slug,
project_id, and intake_data exceeds the 100-char line-length policy; reformat
the invocation by breaking the call across multiple lines so each line stays
under 100 characters (e.g., put the opening paren after client.intake.create and
place workspace_slug=..., project_id=..., data=... on their own indented lines)
and apply the same multiline formatting to the other client.intake.create
occurrence that also exceeds 100 chars.
In `@plane_mcp/tools/milestones.py`:
- Line 72: The single-line call to client.milestones.create(...) is too long;
reformat the invocation to obey the 100‑char line limit by breaking the call
across multiple lines (one argument per line or grouping keyword args) and
aligning continued lines, e.g., split the call to client.milestones.create and
place workspace_slug=..., project_id=..., and data=... each on their own
indented line; apply the same re-wrapping to the second occurrence around line
140 so both calls conform to the file's black/ruff 100-character formatting
rules.
---
Nitpick comments:
In `@plane_mcp/tools/work_item_relations.py`:
- Line 71: The two adjacent f-strings used in the error message should be
combined into a single f-string for readability; update the code that constructs
the invalid relation_type error message (the expression using relation_type and
get_args(WorkItemRelationTypeEnum)) to use one f-string that includes both the
descriptive text and the interpolated values.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 137531a0-5cb4-46ff-b130-bc9ceeca0997
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (20)
CLAUDE.mdplane_mcp/auth/plane_oauth_provider.pyplane_mcp/client.pyplane_mcp/server.pyplane_mcp/tools/__init__.pyplane_mcp/tools/cycles.pyplane_mcp/tools/epics.pyplane_mcp/tools/initiatives.pyplane_mcp/tools/intake.pyplane_mcp/tools/labels.pyplane_mcp/tools/milestones.pyplane_mcp/tools/modules.pyplane_mcp/tools/projects.pyplane_mcp/tools/states.pyplane_mcp/tools/work_item_properties.pyplane_mcp/tools/work_item_relations.pyplane_mcp/tools/work_item_types.pyplane_mcp/tools/work_items.pyplane_mcp/tools/workspaces.pypyproject.toml
Description
Type of Change
Test Scenarios
Summary by CodeRabbit
Dependencies
Development