RobertCraigie / RobertCraigie/pyright-python

Add a less verbose second hook

Open
#269 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
277
Forks
31
Avg merge
4h 22m
Merged PRs (30d)
3

Description

pyright's output is quite verbose for a pre-commit hook. We can combine it with grep to give much less verbose output:

hooks:
  - id: pyright
    entry: bash -c '! pyright "$@" | grep -Po "(?<=$PWD/)(.*:.*)"' --

Does it make sense to add this as a second hook, maybe "pyright-minimal"?

Of course, a caveat here is that it is less robust and could silently fail if $PWD contains funny special characters.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing pyright pre-commit hook definition and any tests or fixtures covering its output. Compare the proposed pyright-minimal command with the current hook, then verify that the new hook produces reduced output without hiding failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.