How do I disable username annotations in PyCharm

6.1k Views Asked by At

I'm not sure if it was an update or I enabled a setting but I am seeing my code annotated with git blame usernames inline with the code.

The git blame action says it is turned off.

When I click on the username the column with the line numbers expands and shows the timestamps.

How to I disable the usernames from appearing?

Inline Username

After Clicking

After Clicking

5

There are 5 best solutions below

3
Simon Que On BEST ANSWER

I had the same problem. Solved it by right-clicking the line number column. There's an option in the menu to turn off code change information. I don't remember the exact menu option name because I don't know how to turn it back on to check.

0
Bob Stein On

Right-click any line number. Then uncheck Annotate with Git Blame

unblame - by unchecking "Annotate with Git Blame"

Counter-intuitively, you cannot right-click the annotation itself (the part you want to disappear). You have to right-click the line number. Or right-click the line of code and the same option is buried in the Git submenu.

Credit for this answer goes to @SimonQue. But since his answer did not name the right-click option ("turn off code change information" is not very helpful because it is very different from "Annotate with Git Blame"), or provide a picture, or point out that the solution is counter-intuitive and so must be memorized (you can't right-click the thing you want to disappear; you have to right-click a thing next to it), I thought that editing his answer would rewrite it completely. So I wrote a new answer. This appears to displease some people, ah well.

1
HandlerExploit On

enter image description here

This can be solved by navigating to Preferences > Editor > Inlay Hints and then within Code vision they have an option (enabled by default for me) for Code author. Just disable this and it goes away.

0
Tetiana QA On

Had same issue, found your topic, and realized that it is possible to hide annotations by clicking username once again (your first screenshot)

0
ishahak On

Right-clicking the author is tricky because it sometimes activates the blame (as in left click)

My quick solution: Shift-shift and write "inlay" - you will get the toggle. Need to go to another tab a back to get it actually disappear