Reputation: 1269
Where is the option to disable the spell check on the strings for the PyCharm IDE? I hate the jagged line under my comments and strings.
Upvotes: 124
Views: 75113
Reputation: 96
You can find it here.
File -> Settings -> Editor -> Inspections -> Spelling
or
press Double Shift
and search 'Spelling'
Upvotes: 0
Reputation: 11
I found how to disable typos only in string literals in official documentation by disabling process literals, but it doesn't work for me (maybe it's a bug, that will be fixed in the future).
Upvotes: 1
Reputation: 51
For single line you can use the # noqa
at the end of the line and it will suppress spelling inspections (the squiggly green line).
GOOFY_API_USERNAME_THING = "LAksdfallae@#lkdaslekserlse#lsese" # noqa
I'm using PyCharm 2021.3.2
Upvotes: 5
Reputation: 301
You can disable spellchecking for specific code section by commenting # noinspection SpellCheckingInspection
above it.
See https://www.jetbrains.com/help/pycharm/spellchecking.html
Upvotes: 13
Reputation: 312
In my opinion the best option is to disable typo checks only for code. This way green lines under variable/method/class names and strings disappear, but PyCharm still controls comments to avoid misspellings, so You have both nice compact code and fully understandable docs.
I don't exactly know since which PyCharm version this option is accessible, but for sure in revision 2020.2 if You highlight a Typo in Settings > Editor > Inspections > Proofreading there are three additional options in the right panel - just uncheck Process code.
Upvotes: 6
Reputation: 321
In the latest version of PyCharm it appears as ProofReading:
Upvotes: 22
Reputation: 846
In the newer version of PyCharm, go to Preferences -> Editor -> Inspections -> Spelling.
Upvotes: 2
Reputation: 1688
Go to File -> Settings -> Editor -> Inspections
. Expand the list under Spelling
in the middle window and uncheck the option Typo
.
However, practically most of the jagged line is caused by violations of the PEP 8 coding style. If you would like to disable this option too, in the same window, expand the list under Python
and uncheck the option PEP 8 coding style violation
.
Upvotes: 135
Reputation: 5789
You can also add particular typo word to PyCharm dictionary by pressing Alt + Enter this word and select Save [typo word] to dictionary
. Sometimes this is best choice for me.
Upvotes: 1
Reputation: 101959
PyCharm does not check the syntax inside strings and comments. It checks spelling.
You can find the settings of the spell-checker under the Settings... page. There is a Spelling page inside Project Settings. Inside this page, at the bottom of the Dictionaries tab you can enable/disable dictionaries. If you don't want spell checking simply disable all of them.
Note that it is possible to add custom words in the spell checker, or, if you already have a dictionary on your computer, you can add it. This can turn out useful if you want to spell check different languages (for example Italian).
In particular if you are using a Linux system and you have installed the Italian language pack, you probably have the Italian dictionary under: /usr/share/dict/italian
.
You can add the /usr/share/dict
directory to the directories searched for dictionaries and enable the italian
dictionary.
It seems like PyCharm only checks files with the .dic
extension. If you want to use /usr/share/dict/italian
you should probably either copy it into an other directory renaming it italian.dic
or you could create a symbolic link.
Upvotes: 6