PyCharm
A professional IDE specialized for Python development, covering all Python domains from scientific computing to web development
Shortcuts for continuously improving Python code quality with automatic refactoring features like variable renaming, method extraction, and inlining
Shift+F6
Rename
Safely rename a symbol across the entire project.
💡 Hint: F6 to rename
🎯 Safely rename variables, functions, and class names across the entire project
Ctrl+Alt+M
Extract method
Extract selected code into a new method.
💡 Hint: Method
🎯 Extract selected code as a new method to reduce duplication
Ctrl+Alt+V
Extract variable
Extract selected expression into a new variable.
💡 Hint: Variable
🎯 Extract complex expressions as variables to improve code readability
Ctrl+Alt+N
Inline
Inline a variable, method, or parameter.
💡 Hint: iNline
🎯 Inline variables or methods to eliminate unnecessary abstractions
F6
Move
Move a class, method, or file to another location.
💡 Hint: F6 to move
🎯 Move classes or methods to appropriate modules to improve structure
Ctrl+Alt+F
Extract field
Extract selected expression into a class field.
💡 Hint: Field
🎯 Promote local variables to class fields to expand scope
Ctrl+Alt+C
Extract constant
Extract selected expression as a constant.
💡 Hint: Constant
🎯 Extract magic numbers or strings as constants to improve maintainability
Alt+Delete
Safe delete
Safely delete unused elements.
💡 Hint: Safe delete
🎯 Safely delete unused code to keep the codebase clean