Skip to content

error: Failed to create fix for FormatLiterals: Failed to extract argument at: 1 #6388

@domsj

Description

@domsj
$ ruff check .
error: Failed to create fix for FormatLiterals: Failed to extract argument at: 1
$ echo $?
0

I'm sometimes getting this "error" since upgrading to ruff 0.0.282. Error between quotes, because it does seem to not error out due to this.
Clearing the cache (rm -rf .ruff_cache) allows to always reproduce it.

Unfortunately I don't know which code in my project is causing the issue (and I can't share the project).

Tried running with -v, but it's not giving much insight either.

$ rm -rf .ruff_cache/ && ruff check . -v
...
[2023-08-07][15:08:00][ruff::rules::isort::categorize][DEBUG] Categorized 'pandas' as Known(ThirdParty) (NoMatch)
[2023-08-07][15:08:00][ruff::rules::isort::categorize][DEBUG] Categorized 'google.cloud' as Known(ThirdParty) (NoMatch)
error: Failed to create fix for FormatLiterals: Failed to extract argument at: 1
[2023-08-07][15:08:00][ruff::rules::isort::categorize][DEBUG] Categorized 'logging' as Known(StandardLibrary) (KnownStandardLibrary)
...
[2023-08-07][15:08:00][ruff_cli::commands::run][DEBUG] Checked 51 files in: 429.3884ms

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