Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I ignore the "redundant parentheses" feature in PyCharm?

Tags:

python

pycharm

PyCharm decides that certain parenthesis in my Python code are 'redundant'. I want to keep them anyway. So PyCharm started annoying me with green lines under them. I don't want to give in to PyCharm's quirks.

I was able to ignore other warnings in the following way:

File > Settings > Editor > Inspections > uncheck all warnings that you don't like..

Sadly, the 'redundant parentheses' warning does not appear in that list.

How do I ignore this warning?

like image 236
K.Mulier Avatar asked Dec 03 '22 23:12

K.Mulier


2 Answers

redundant parenthesis is a weak warning. You can just uncheck the box there.

enter image description here

like image 198
milaniez Avatar answered Feb 07 '23 11:02

milaniez


There is redundant parenthesis under Inspections (PyCharm 2016.1.4). Look closer.

If you still can't find it, there is a search bar on the top left corner of the settings menu. Search for redun and the redundant parenthesis inspection should come up.

like image 27
DeepSpace Avatar answered Feb 07 '23 10:02

DeepSpace