Did pycharm inspections change in 2022.3

Seems like these inspections are not working anymore and nowhere to turn them back on?

 

  • Blank line at  end of file
  • 2 blank lines between imports and class start
  • 2 blank lines between classes and functions in a single file
  • Single blank line between methods in a class

Is it just me?

 

0
8 comments

Hi, the inspections should work. To check this, you can open Preferences | Editor | Inspections, select the default inspection profile and see if the issue is reproduced.

0

Yes. I switched back to the default profile.  Same issue

0

Could you please provide a code sample to reproduce the issue and indicate the line at which you expect to see the inspection?

0

Here is one with extra lines before the class and now blank end of line

 


from logging import Logger
from logging import getLogger

from miniogl.ShapeModel import ShapeModel
from ogl.OglObject import OglObject

from untanglepyut.Common import GraphicInformation





class BaseUnTangle:

def __init__(self):
self.baseLogger: Logger = getLogger(__name__)

def _updateModel(self, oglObject: OglObject, graphicInformation: GraphicInformation) -> ShapeModel:
"""
This is necessary if it is never added to a diagram
and immediately serialized

Args:
oglObject: OglObject with a model
graphicInformation: The graphic class graphic information

Returns: The updated shape model as a way of documenting that we updated it
"""
model: ShapeModel = oglObject.GetModel()
model.SetPosition(x=graphicInformation.x, y=graphicInformation.y)

return model
0

Thank you, the inspections work correctly for me on this sample:

Does the issue reproduce in a new minimal project? Could you show a screenshot of the pep 8 coding style violation inspection settings?

0
Hmm.  Ok, I may try an uninstall and re-install of PyCharm

In the meantime, I saved my current preferences;  I am including the to see if you can see anything wrong




<profile version="1.0" is_locked="false">
<optionname="myName"value="hasiiInspections"/>
<inspection_toolclass="HtmlUnknownTag"enabled="true"level="WARNING"enabled_by_default="true">
<optionname="myValues">
<value>
<listsize="7">
<itemindex="0"class="java.lang.String"itemvalue="nobr"/>
<itemindex="1"class="java.lang.String"itemvalue="noembed"/>
<itemindex="2"class="java.lang.String"itemvalue="comment"/>
<itemindex="3"class="java.lang.String"itemvalue="noscript"/>
<itemindex="4"class="java.lang.String"itemvalue="embed"/>
<itemindex="5"class="java.lang.String"itemvalue="script"/>
<itemindex="6"class="java.lang.String"itemvalue="marquee"/>
</list>
</value>
</option>
<optionname="myCustomValuesEnabled"value="true"/>
</inspection_tool>
<inspection_toolclass="PyIncorrectDocstringInspection"enabled="true"level="WARNING"enabled_by_default="true"/>
<inspection_toolclass="PyMethodMayBeStaticInspection"enabled="false"level="WEAK WARNING"enabled_by_default="false"/>
<inspection_toolclass="PyPackageRequirementsInspection"enabled="true"level="WARNING"enabled_by_default="true">
<optionname="ignoredPackages">
<value>
<listsize="8">
<itemindex="0"class="java.lang.String"itemvalue="HtmlTestRunner"/>
<itemindex="1"class="java.lang.String"itemvalue="urllib3"/>
<itemindex="2"class="java.lang.String"itemvalue="wx"/>
<itemindex="3"class="java.lang.String"itemvalue="wxpython"/>
<itemindex="4"class="java.lang.String"itemvalue="core"/>
<itemindex="5"class="java.lang.String"itemvalue="deprecated"/>
<itemindex="6"class="java.lang.String"itemvalue="pyutmodel"/>
<itemindex="7"class="java.lang.String"itemvalue="setuptools"/>
</list>
</value>
</option>
</inspection_tool>
<inspection_toolclass="PyPep8Inspection"enabled="true"level="WEAK WARNING"enabled_by_default="true"editorAttributes="WARNING_ATTRIBUTES"/>
<inspection_toolclass="PyPep8NamingInspection"enabled="false"level="WEAK WARNING"enabled_by_default="false"/>
<inspection_toolclass="PyUnresolvedReferencesInspection"enabled="true"level="WARNING"enabled_by_default="true">
<optionname="ignoredIdentifiers">
<list>
<optionvalue="wx.core.ListBox.SetSizerProps"/>
<optionvalue="wx.core.BitmapButton.SetSizerProps"/>
<optionvalue="wx.lib.sized_controls.SizedPanel.SetSizerProps"/>
<optionvalue="wx.core.TextCtrl.SetSizerProps"/>
<optionvalue="wx.lib.sized_controls.SizedStaticBox.SetSizerProps"/>
<optionvalue="wx.core.SpinCtrl.SetSizerProps"/>
<optionvalue="wx.core.ComboBox.SetSizerProps"/>
<optionvalue="wx.lib.sized_controls.SizedDialog.SetSizerProps"/>
<optionvalue="wx.core.Toolbook.SetSizerProps"/>
<optionvalue="wx.core.Notebook.SetSizerProps"/>
<optionvalue="miniogl.DiagramFrame.DiagramFrame.SetSizerProps"/>
</list>
</option>
</inspection_tool>
</profile>




0

Looks valid. Maybe some project config is corrupted. I would suggest some things to try:

- Check if the issue is reproduced in a new minimal project

- Try reinstalling PyCharm 

- Try resetting PyCharm to default settings

To restore default settings, you can use **File | Manage IDE settings | Restore Default Settings...**. Your current settings will be backed up, so you can revert to them later if needed (to do this, just import settings from the backed up folder). 

0

Got it to work by

  1. Uninstalling PyCharm
  2. Reboot OS X
  3. Re-install PyCharm
  4. Removed the offending project .idea directory
  5. ReSetup the code as a PyCharm project
  6. Reset back to default setting (inspections worked correctly)
  7. Loaded my customized settings (inspections worked correctly

 

When I opened other projects they still did not observe the PEP settings until I re-created the project by deleting the .idea directory

 

0

Please sign in to leave a comment.