Skip to content

BUG: inappropriate Nones in f-strings #1140

@BobTheBuidler

Description

@BobTheBuidler

if a variable is Final but the value is not yet known at compile-time, and that variable is used as an input to an f-string, the f-string will incorrectly contain "None", as seen in the code block below:

abc: Final = some_thing()

string = f"{abc}"
print(string)

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