Skip to content

Simplify Q003 implementation #7808

@dhruvmanila

Description

@dhruvmanila

The current implementation of Q003 rule to accommodate the nested f-strings is a bit too complex. It can possibly be simplified using two loops instead of one. The outer loop is the regular token loop while the inner loop would be for the f-strings. When the outer loop encounters the FStringStart token, then the control would go to the inner loop where it would be easier to just break if it's not possible to perform the check.

This is low priority and an internal refactor for readability purpose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalAn internal refactor or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions