SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: jporkkahtc on October 01, 2019, 09:06:23 pm

Title: refactor_quick_rename fails in python
Post by: jporkkahtc 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   
---------------------------
Title: Re: refactor_quick_rename fails in python
Post by: Dennis 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.
Title: Re: refactor_quick_rename fails in python
Post by: Clark on October 04, 2019, 12:17:18 am
Download v24.0.0.8. This is fixed in v24.0.0.8