Skip to content

Default ... exclusion can exclude things by accident #2112

Description

@nedbat

By default, this regex is excluded from reporting:

^\s*(((async )?def .*?)?\)(\s*->.*?)?:\s*)?\.\.\.\s*(#|$)

This is meant to exclude ... on a line by itself, as well as any function that has only that as its body.

Scriv has a YAML literal in its tests that looks like this:

YAML_LITERAL = """\
---
version: 1.2.3

myVersion:
  MAJOR: 2
  MINOR: 3
  PATCH: 5

myproduct:
  version: [mayor=5, minor=6, patch=7]
  versionString: "8.9.22"
...
"""

The whole statement is mistakenly excluded from reporting because of the three dots at the end (YAML syntax for end of document).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions