Author Topic: refactor_quick_rename fails in python  (Read 1853 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
refactor_quick_rename fails in python
« on: October 01, 2019, 09:06:23 PM »
In python, given this bit of code
Code: [Select]
def main(args):
    with open("logfile.txt", 'a', newline='') as log_file:
        print("LOG ", args, file=log_file)

Attempting to rename "log_file" fails with
---------------------------
SlickEdit Pro
---------------------------
Definition of 'log_file' not found.
---------------------------
OK   
---------------------------

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: refactor_quick_rename fails in python
« Reply #1 on: October 01, 2019, 11:54:48 PM »
Not a quick-refactoring bug per-se.  The problem is that "log_file" is not recognized as a local variable.

I'll file a bug for someone to look into fixing that in the Python parser.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: refactor_quick_rename fails in python
« Reply #2 on: October 04, 2019, 12:17:18 AM »
Download v24.0.0.8. This is fixed in v24.0.0.8