Out-of-scope files

If you are confused about why APIs that are included in some external libraries or scripts are not showing up in your code completion suggestion lists, chances are the files containing those APIs are not included as part of your project:

  • For an external Python file containing classes and methods you'd like to include in code completion suggestion lists, check to see if it is inside the project folder you are working on and if it is currently marked as a plain text file (it shouldn't be).
  • For third-party packages and libraries, make sure to actually install them (globally or in the current virtual environment) and add them to the requirements.txt file of your project. We have seen that requirements.txt plays an important role in detecting unmet dependency requirements and that that information is used for code completion purposes as well.

Troubleshooting also marks the end of our discussion on code completion in PyCharm. Throughout this section, we have discussed some of the most common and most powerful features offered by PyCharm's code completion support.

There are, of course, many more available features and functionalities included in PyCharm that you might find useful for your development process. Therefore, it is important that you keep exploring and playing around with various options for code completion so that you find the best settings and customizations for your own preferences.

After code completion, the second topic regarding editing and formatting Python code within PyCharm is refactoring. Let's have a look at this in detail.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.70.203