Skip to content

Spurious PLE1300 error with 0.0.283 #6442

@DimitriPapadopoulos

Description

@DimitriPapadopoulos

After upgrading v0.0.281 → v0.0.282 (codespell-project/codespell#3011) we see what we think is a spurious PLE1300 error:

  • Minimal code snippet:
    s = "{0}{1:{width}}".format("a", "1", width=15)
  • The command invoked:
    $ ruff --select PLE file.py 
    file.py:1:5: PLE1300 Unsupported format character '}'
    Found 1 error.
    $ 
    
  • The current Ruff settings: no pyproject.toml file
  • The current Ruff version:
    $ ruff --version
    ruff 0.0.283
    $ 
    

The Format String Syntax documentation states:

A format_spec field can also include nested replacement fields within it. These nested replacement fields may contain a field name, conversion flag and format specification, but deeper nesting is not allowed.

Metadata

Metadata

Assignees

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