Skip to content

check-yaml: .nan is not a finite number #2544

Description

@Timple

Before submitting

  • I have searched the issue list for similar bug reports.

Summary

.nan assignment is reported as invalid yaml

check yaml...............................................................Failed
- hook id: check-yaml
- description: checks yaml files for parseable syntax
- exit code: 1

  myfile.yaml: Failed to yaml decode (error: line 40 column 24: value `.nan` is not a finite number
    --> <input>:40:24
     |
  38 |     linear.x.max_velocity: 1.25 # unit: m/s
  39 |     linear.x.max_acceleration: 1.5
  40 |     linear.x.max_jerk: .nan
     |                        ^ value `.nan` is not a finite number

pre-commit tool works with same config file.

Platform

Linux 6.8.0-136-generic x86_64 GNU/Linux

Version (current: 0.4.13)

prek 0.4.13

.pre-commit-config.yaml

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: check-yaml

Log file

Let me know if required, I need to make a minimal reproducer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions