Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"language_version" values in examples are not quoted as explicit yaml strings #236

Closed
gyermolenko opened this issue Jun 9, 2019 · 1 comment
Labels

Comments

@gyermolenko
Copy link

Site gives examples like "language_version: 2.1.5" e.g. here

cfgv checker expects string.

So if language_version starts with digit like

repos:
  - repo: https://
    rev: beef
    hooks:
      - id: some-id
        language_version: 3.7

it causes errors like this

An error has occurred: InvalidConfigError: 
...
==> At key: hooks
==> At Hook(id='some-id')
==> At key: language_version
=====> Expected string got float
Check the log at /home/.../.cache/pre-commit/pre-commit.log
@asottile
Copy link
Member

asottile commented Jun 9, 2019

2.1.5 is not a float

as with yaml, if it could be a float and you want a string you'll need to quote it

@gyermolenko gyermolenko changed the title "language_version" examples are sometimes floats inst. of strings "language_version" values in examples are not quoted as explicit yaml strings Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants