Problem
Specific parts of Python code, such as self and __init__, are not displayed in the expected colors in PyCharm.
Cause
Related to the project settings or configuration, or misconfigured colors.
Resolution
- Check the color scheme settings at Settings | Editor | Color Scheme | Python.
- Look for the "Self parameter" setting under the Python section, which controls the color of "self" and "cls" keywords.
- If the issue persists, disable custom plugins and test in a new project. If colors display correctly in the new project:
- Create a new project.
- Move all files and folders from the problematic project to the new one.
- If necessary, reset to default settings by following the instructions at https://www.jetbrains.com/help/pycharm/configuring-colors-and-fonts.html#python-settings.
Comments
0 comments
Please sign in to leave a comment.