Skip to content

Add format-dedent as a pre-commit hook for dev#1504

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/use-format-dedent-for-dev
Closed

Add format-dedent as a pre-commit hook for dev#1504
Copilot wants to merge 2 commits into
mainfrom
copilot/use-format-dedent-for-dev

Conversation

Copilot AI commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Adds format-dedent to the dev workflow as a prek hook. It auto-formats multiline string arguments of textwrap.dedent() calls.

  • Dev dependency: format-dedent>=0.1.1
  • Local hook (upstream repo has no tagged releases):
    - repo: local
      hooks:
        - id: format-dedent
          name: format-dedent
          entry: uv run --frozen --offline format-dedent --write
          language: system
          types: [python]
          priority: 0
  • Priority restructure: format-dedent at priority 0, existing hooks bumped to 1, analysis hooks (deptry, import-linter, ty) to 2. This avoids write conflicts with ruff on Python files and ensures the bespoke formatter runs before the comprehensive one.

No existing files required formatting changes.

Original prompt

This section details on the original issue you should resolve

<issue_title>Use format-dedent for dev</issue_title>
<issue_description>https://github.com/15r10nk/format-dedent

As a pre-commit hook</issue_description>

Comments on the Issue (you are @copilot in this section)


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/1947df4e-cdad-4916-86d5-16f97da22cf9
Copilot AI changed the title [WIP] Add pre-commit hook for format-dedent Add format-dedent as a pre-commit hook for dev Mar 25, 2026
Copilot AI requested a review from nathanjmcdougall March 25, 2026 01:00
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review March 25, 2026 01:29
@codecov

codecov Bot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Mar 25, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing copilot/use-format-dedent-for-dev (4463857) with main (d69f331)

Open in CodSpeed

@nathanjmcdougall

Copy link
Copy Markdown
Collaborator

Yet again going to start afresh with updated agent skills.

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.

Use format-dedent for dev

2 participants