PyCharm:Inspections
PyCharm에서 확인할 수 있는 inspection 목록.
Suppressing comments
# noinspection PyPep8
또는 # noinspection PyPep8, PyPep8Naming
와 같은 느낌으로 주석처리하면 된다.
- PyPep8
- PyPep8Naming
- PyTypeChecker
- Unexpected type(s): {...} Possible type(s): {...}
- Expected type '...', got '...' instead
- Unexpected argument
- Method 'xxx' may be 'static'
- Usually first parameter of a method is named '{...}'
- Package containing module '{MODULE_NAME}' is not listed in the project requirements
- Access to a protected member '{_member_name}' of a module
- Type of '{member_name}' is incompatible with '{protocol_type}'
- Shadows built-in name {...}
- ModuleNotFoundError: No module named '...'
- '...' in the try block with 'except ImportError' should also be defined in the except block
- Cannot find reference
- Unresolved attribute reference '...' for class '...'
- Typo errors.
- '...' object is not callable
noinspection example
아래와 같이 noinspection
를 주석으로 추가하면 된다.
# noinspection PyUnusedLocal, PyUnreachableCode
def on_show(self, event):
if not self.name:
wx.MessageBox(lang.NAME_IS_EMPTY, lang.INFO, wx.OK | wx.ICON_INFORMATION)
self.Close()
Find script
$ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |'
See also
- Python
- PyCharm
- flake8
- WebStorm:Inspections
- pycodestyle - Simple Python style checker in one Python file