Skip to content

apostrophe character in .cfg files #5

Open
@obriencj

Description

@obriencj

The apostrophe (single-quote) character in a setup.cfg leads to all text after that point being miscolored, until a matching apostrophe is run across.

In the case of setup.cfg, the apostrophe character has no special meaning, and should not trigger any sort of coloration at all. This is from using Python's ConfigParser underlying implementation.

I run into this all of the time because my last name has an apostrophe in it. eg.
https://github.com/obriencj/koji-smoky-dingo/blob/master/setup.cfg

In the cases for this type of file, an apostrophe may have meaning as part of the value to be parsed later on, eg. these lines

install_requires =
  appdirs
  koji
  typing_extensions ; python_version < '3.10'

That isn't special syntax for the cfg format itself there, those are passed along verbatim for other tools to interpret.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions