Push/pop PyCharm inspector settings

I would like to push/pop inspector settings within a file, just as I can selectively enable/disable diagnostics with #pragmas with gcc or llvm.

Currently I only see an option to disable an inspection, e.g.:

# noinspection PyClassHasNoInit

There's no matching "# inspection" to enable an inspection; but more importantly, forcing an inspection to "on" would override whatever settings already exist.

Push/popping respects whatever existing (context) settings for the inspector before and after the commands, which is why it's better.

Does this exist? If not, can it be added?

Please sign in to leave a comment.