PyCharm
 
2021.1
Get PyCharm
You are viewing the documentation for an earlier version of PyCharm.

File watchers

Last modified: 08 March 2021

This is a Professional feature: download PyCharm Professional to try.

Required plugin: File Watchers

File Watcher is a PyCharm tool that allows you to automatically run a command-line tool like compilers, formatters, or linters when you change or save a file in the IDE.

File watchers have two dedicated code inspections:

  • The File watcher available inspection is run in every file where a predefined File Watcher is applicable. If the project has no relevant File Watcher configured, PyCharm suggests to add one.

  • The File watcher problems inspection is invoked by a running File Watcher and highlights errors specific to it.

You can use one of the available templates or configure a File Watcher from scratch. A configured File Watcher can be saved in your project settings or in the IDE settings and used in different projects.

For information on File watchers for specific tools, see the corresponding pages:

Note that using some of these tools in PyCharm requires that you install plugins on the Settings/Preferences | Plugins page as described in Installing plugins from JetBrains repository.