Skip to content

Add a less verbose second hook #269

Description

@randolf-scholz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions