--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle.py Mon Oct 21 13:30:23 2024 +0200 +++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle.py Mon Oct 21 16:21:24 2024 +0200 @@ -84,7 +84,7 @@ ): # pragma: no cover (<py310) tokenize._compile = lru_cache(tokenize._compile) # type: ignore -__version__ = '2.12.0-eric' +__version__ = '2.12.1-eric' DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox' DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704,W503,W504' @@ -1981,7 +1981,10 @@ if token_type == tokenize.STRING: text = mute_string(text) elif token_type == FSTRING_MIDDLE: # pragma: >=3.12 cover - text = 'x' * len(text) + # fstring tokens are "unescaped" braces -- re-escape! + brace_count = text.count('{') + text.count('}') + text = 'x' * (len(text) + brace_count) + end = (end[0], end[1] + brace_count) if prev_row: (start_row, start_col) = start if prev_row != start_row: # different row