Auto-Indentation when pasting from scratches to the terminal

Every time when I copy and paste something from the Console pyCharm adds auto-indentation to every line. I have checked "Reformat on paste" and it is set as none.
for example:
if my code in the scratch file is

for branch in all_company_branches:    
print(f'added payments to {branch}')

when pasted it is like that:

In [1]: for branch in all_company_branches:
...: print(f'added payments to {branch}')

Note the double indentation before the print()

Comment actions Permalink



I am not sure I got what the problem is, could you please mark where exactly the indentation is being added? 

Screenshots are welcome. 


Also, please make sure you are running 2021.1.3 version which is the latest. 

Comment actions Permalink

Version is 2021.1.3

Comment actions Permalink


Thank you, I have submitted it as a bug please follow it for updates. 

As a possible workaround I suggest using Python Console, paste works as expected for me there. Please make sure "Use IPython if available" is enabled in the Console settings.

I apologize for the inconvenience. 


Please sign in to leave a comment.