Skip to content

Add nodes.Const.kind for r prefix and Python < 3.8 #1156

Open
@DanielNoord

Description

@DanielNoord

Current behavior

Following discussion in pylint-dev/pylint#4787 additional functionality for the nodes.Const.kind attribute would be helpful.
See documentation for current behaviour, which only supports the u prefix and Python =< 3.8

Expected behavior

For the following code, inferring a_string and checking its kind should return r.

Note: at the same time making kind work with the f prefix or combined prefixes such as fr might be possible

a_string = r"Test string"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions