PyCharm spelling – How to work with it

Table of Contents

Introduction

PyCharm is one of my favourite IDE for Python and Django applications.
As you probably already know, comments are a very important feature of your code and it may happen that some words are custom for your application. For this reason PyCharm will not recognized them as valid words.
In this article will see how to work with PyCharm spelling adding (or removing) words to PyCharm dictionary.

Add word to PyCharm dictionary

I was writing a code snippet like the one below and I have noticed that devinsimplewords word was not recognized by PyCharm spelling system.
This is quite annoying since comments are a core part of the code.

Unrecognized word
Example of a word not recognized by PyCharm

To add a new word to PyCharm dictionary follow these steps:

  • Right click on word
  • Click on ‘Show Context Actions’
  • Click on ‘Save <my_word> to dictionary

At this point you have added the word and the green line under the word should be not present anymore.
Great!!

Remove word from PyCharm dictionary

In the previous section you learned how to add a word to PyCharm dictionary but what about if you have added a word incorrectly?
Let’s see you can fix this problem!

Follow these steps:

  • Open PyCharm settings
  • In the Menu on the left click on ‘Editor’ then on ‘Natural Languages’ and ‘Spelling’
  • In this window you should see the list of added words under ‘Accepted words’ section
  • Choose one and click on minus icon to remove it
Remove word from PyCharm dictionary
Steps to remove word from PyCharm

Conclusion

In this article, we learned how to work with PyCharm spelling by adding (and removing) words from its dictionary.
My advice is to always keep PyCharm spelling updated so that you don’t have unnecessary warnings in your project.
This will allow you to better concentrate on writing the code and find any problems right away!

As always, I invite you to write me a comment if something is not clear to you, otherwise take a look at the latest posts!

Leave a Comment

Your email address will not be published. Required fields are marked *