You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Spell Right does not provide a way to ignore only the code inside {} in Python f-strings while still spell-checking the surrounding text. This is an issue because variables and function calls inside {} often trigger spelling errors.
In this example, we expect len(data) not to be underlined, but "potatos" should be:
my_string=f"There are {len(data)} potatos in the dataset"my_dict= {
"potatos": 1,
"tomatoes": 2,
}
Spell Right currently does not handle this as desired: "potatos" is properly underlined, but the len function call is also underlined when it should not.
A workaround using ignoreRegExpsByClass can ignore entire f-strings, but it does not allow selectively ignoring only the interpolated expressions inside {}, so ignoring entire f-strings results in missed typos in the surrounding text.
With this workaround, "len" is not underlined, but the first "potatos" error is missed as it is part of the f-sting which is entirely ignored.
Feature Request:
Add an option to ignore only the code inside {} in f-strings (e.g., function calls, variables) while still spell-checking the surrounding text.
Or, improve regex handling so that capturing parentheses can be used in ignoreRegExpsByClass to ignore specific parts of f-strings without skipping the entire f-string content.
Would this be possible to implement? Thank you for the great extension !
The text was updated successfully, but these errors were encountered:
Currently, Spell Right does not provide a way to ignore only the code inside
{}
in Python f-strings while still spell-checking the surrounding text. This is an issue because variables and function calls inside{}
often trigger spelling errors.In this example, we expect
len(data)
not to be underlined, but "potatos" should be:Spell Right currently does not handle this as desired: "potatos" is properly underlined, but the
len
function call is also underlined when it should not.A workaround using ignoreRegExpsByClass can ignore entire f-strings, but it does not allow selectively ignoring only the interpolated expressions inside
{}
, so ignoring entire f-strings results in missed typos in the surrounding text.With this workaround, "len" is not underlined, but the first "potatos" error is missed as it is part of the f-sting which is entirely ignored.
Feature Request:
{}
in f-strings (e.g., function calls, variables) while still spell-checking the surrounding text.Would this be possible to implement? Thank you for the great extension !
The text was updated successfully, but these errors were encountered: