question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename symbol misses symbols in formatted strings f"{foo}"

See original GitHub issue

From @sdwarwick on September 25, 2017 13:25

Environment data

VS Code version: 1.16.1 Python Extension version: 0.7.0 Python Version: 3.6 OS and version: windows 10

Actual behavior

rename/refactor symbols completely misses symbols inside formatted text strings f"{name}"

name is not found or changed

Expected behavior

clear from above

Steps to reproduce:

Logs

Output from Python output panel

no output

Output from Console window (Help->Developer Tools menu)

no output

Copied from original issue: DonJayamanne/pythonVSCode#1237

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
brettcannoncommented, Apr 18, 2018

This is actually still failing for me. If I have:

thing = 42
print(f'hello, {thing}')

and I attempt a Rename Symbol on thing, it misses the f-string.

1reaction
ikariwingcommented, Apr 11, 2019

FYI (Info from @legnaleurc): @orn688 already wrote a PR for rope to improve the symbol replacement in f-string , that PR is still not merged though. Thanks @orn688 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

generate a list of C++ symbols for mass refactoring/renaming
Op wants to do mass renaming, e.g., generate a list of names, and then rename many of them across a big source code...
Read more >
Material Symbols and Icons - Google Fonts
Introducing Material Symbols. Material Symbols are our newest icons consolidating over 2,500 glyphs in a single font file with a wide range of...
Read more >
Python Tutorial - Getting Started with Python and Python Basics
format ()) (Line 51, 53): Python 3's new style for formatted string via str class member function str.format() . The string on which...
Read more >
Date.FormatStyle.Symbol | Apple Developer Documentation
Types that customize formatting templates either by using the date format style's modifier functions or by constructing fixed-pattern date format strings.
Read more >
Template Designer Documentation - Jinja
Jinja can generate any text-based format (HTML, XML, CSV, LaTeX, etc.). ... Filters are separated from the variable by a pipe symbol (...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found