A PyCharm plugin that automatically displays the type of Python variables in the status bar as you move your cursor through your code.
PyTypeDisplayer enhances your Python development experience by providing real-time type information without requiring explicit annotations. The plugin:
- Shows the inferred type of Python variables in the status bar as you navigate your code
- Works with both explicit type annotations and PyCharm's type inference system
- Updates automatically when you move your cursor to different variables
- Provides detailed type information for various Python data structures
- Integrates seamlessly with the PyCharm interface
When working with Python code like:
name = "John"
age = 30
users = ["Alice", "Bob", "Charlie"]
coordinates = (10.5, 20.3)
person = {"name": "Sarah", "age": 25}
As you move your cursor over each variable, the status bar will automatically display:
name: str
age: int
users: list
coordinates:
tuple person: dict
After installation:
- The plugin automatically activates for Python files.
- Move your cursor over any variable in your Python code.
- Look at the status bar at the bottom of the IDE to see the variable's type.
- The type information updates in real-time as you navigate through your code.
- Right-click on the status bar.
- Check or uncheck "Python Type Information" in the menu.
- IntelliJ IDEA or PyCharm
- Java Development Kit (JDK) 17 or newer
- Gradle 7.5 or newer
-
Clone this repository:
git clone https://github.com/aircode610/PyTypeDisplayer.git
-
Navigate to the project directory:
cd PyTypeDisplayer
-
Build the plugin:
./gradlew buildPlugin
-
The plugin will be generated in the
build/distributions
directory. -
Run the plugin:
- You can either run it using Gradle:
./gradlew runIde
- Or install it in PyCharm manually:
- Open PyCharm.
- Go to Settings/Preferences → Plugins.
- Click the gear icon ⚙ and select "Install Plugin from Disk...".
- Select the built
.zip
file frombuild/distributions/
. - Click OK → Apply → Restart PyCharm.
- You can either run it using Gradle: