0

Config = namedtuple( 'c', ['height'] ) DEFAULT_CONFIG = Config(height=4)

I want to rename the argument height to start_height everywhere in my code, including mentions of config.height and calls to Config(height=4)

When I click refactor on the string 'height' I get "cannot refactor". When I click the height in the DEFAULT_CONFIG line, it doesn't find any other mentions. When I click code that uses config.height the rename option is greyed out.

Sam Shleifer
  • 1,716
  • 2
  • 18
  • 29

1 Answers1

0

On mac, command-shift-r (or replace in path under Edit/Find) will allow you to click through every instance of the string height in the project and decide whether to replace that mention with start_height.

Sam Shleifer
  • 1,716
  • 2
  • 18
  • 29