Skip to content

Fix Ruff FBT001 by making boolean args keyword-only and removing suppression#249

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fbt001-fix-linter-error
Draft

Fix Ruff FBT001 by making boolean args keyword-only and removing suppression#249
Copilot wants to merge 2 commits into
mainfrom
copilot/fbt001-fix-linter-error

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

This PR addresses FBT001 by eliminating boolean positional parameters in function signatures and removing FBT001 from the Ruff ignore list. The goal is to enforce safer, clearer call sites without changing taskflow behavior.

  • Lint policy update

    • Removed FBT001 from tool.ruff.lint.ignore in pyproject.toml.
  • Keyword-only boolean parameters

    • Converted boolean flags to keyword-only in targeted APIs:
      • TemplateMigrator.__init__(..., *, dry_run=False)
      • TemplateMigrator.migrate_directory(..., *, recursive=True)
      • TaskAgent.__init__(..., *, exclude_from_context=False, ...)
      • build_mcp_servers(..., *, headless=False)
      • render_model_output(..., *, log=True, async_task=False, ...)
      • _build_prompts_to_run(..., *, repeat_prompt, ...)
      • run_prompts(*, async_task=False, max_concurrent_tasks=5)
      • TaskflowSession.record_task(..., *, success, ...)
      • env_function(..., *, required=True)
  • Call-site adjustments

    • Updated affected calls to pass renamed keyword-only booleans explicitly (notably in runner.py), preserving existing semantics.

Example of the pattern applied:

def build_mcp_servers(
    available_tools: AvailableTools,
    toolboxes: list[str],
    blocked_tools: list[str] | None = None,
    *,
    headless: bool = False,
) -> list[MCPServerEntry]:
    ...

Copilot AI review requested due to automatic review settings June 1, 2026 13:34
Copilot AI review requested due to automatic review settings June 1, 2026 13:34
Copilot AI linked an issue Jun 1, 2026 that may be closed by this pull request
Copilot AI requested review from Copilot and removed request for Copilot June 1, 2026 13:42
Copilot AI changed the title [WIP] Fix linter error FBT001 and remove from suppression list Fix Ruff FBT001 by making boolean args keyword-only and removing suppression Jun 1, 2026
Copilot AI requested a review from kevinbackhouse June 1, 2026 13:43
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.

FBT001

2 participants