Skip to content

precommit hook with the --quote='"' argument doesn't work #17

Description

@jl-gel

Hi there

I would like to use unify as a pre-commit hook, but not with the default single quotations. Rather I would like single quotes to be amended to double quotes.

repos: 
    -   repo: https://github.com/pre-commit/pre-commit-hooks
        rev: v3.4.0
        hooks:
        -   id: end-of-file-fixer
        -   id: trailing-whitespace
    -   repo: https://github.com/myint/unify
        rev: v0.5
        hooks:
        -   id: unify
            args: [--in-place, --quote='"']

This is the pre-commit-config file, but I keep getting the following error:
unify: error: argument --quote: invalid choice: '\'"\'' (choose from "'", '"')

It works absolutely fine via the command line, but not as pre-hook-commit. :(

Thanks, I would appreciate any advice!

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