Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whitews/pycharm-inspection-suppression-list
List of text strings for suppressing inspections in PyCharm
https://github.com/whitews/pycharm-inspection-suppression-list
inspection pep8 pycharm python suppressing-inspections
Last synced: 3 days ago
JSON representation
List of text strings for suppressing inspections in PyCharm
- Host: GitHub
- URL: https://github.com/whitews/pycharm-inspection-suppression-list
- Owner: whitews
- Created: 2016-04-12T14:02:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T20:47:20.000Z (7 months ago)
- Last Synced: 2024-04-12T00:24:54.117Z (7 months ago)
- Topics: inspection, pep8, pycharm, python, suppressing-inspections
- Homepage:
- Size: 9.77 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# List of strings to suppress PyCharm inspections
[Click here for a table listing text strings for suppressing inspections in PyCharm](https://github.com/whitews/pc-inspection-suppression-list/blob/master/suppress-inspection.csv "View List")**If you find this a useful reference, please submit a pull request with descriptions for any undocumented suppression strings.**
Inspection suppression strings can be found in the PyBundle.properties file inside the pycharm.jar bundle. Grep for comments including the string "Inspection":
grep Inspection pycharm/com/jetbrains/python/PyBundle.properties | grep ^#
## How to suppress inspections in PyCharm
For any inspection warning that you wish to suppress, include a commented line beginning with `noinspection`, followed by the appropriate inspection string. Say you have an import that PyCharm complains about, yet you know it is satisfied by your setup file or requirements.txt file. In my experience, this happens for various NumPy or cv2 methods, or with the PIL library (because the package name differs from its import string). To suppress the inspection warning, add the suppression string on the line just before the offending code, like so:
```
# noinspection PyPackageRequirements
import cv2
```