Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Python Notes RemoverNew to Visual Studio Code? Get it now.
Python Notes Remover

Python Notes Remover

H1DDENADM1N

|
5 installs
| (0) | Free
A new version of the comment remaster using AST and tokenize: Count or remove Python comments (doc-strings; single-line; multi-line; inline, etc.), supporting single files and folders. Used for regenerating comments for AI, translating comments, or simply reducing code volume.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

python-notes-remover README

A Visual Studio Code extension for managing Python comments. This extension helps you check and remove comments from Python files or directories, only using python build-in functions(AST and tokenize). Count or remove Python comments (docstrings; single-line; multi-line; inline, etc.), supporting single files and folders. Used for regenerating comments for AI, translating comments, or simply reducing code volume.

Features

🔍 Check Comments

feature check

  • Analyze Python files or entire directories to identify comments
  • View detailed reports of comment usage
  • Get insights into comment patterns in your codebase

🗑️ Remove Comments

feature remove

  • Safely remove comments from Python files while preserving functionality
  • Automatic backup creation before any modifications
  • Integrated diff viewer to review changes before accepting them
  • Support for both individual files and entire directories

📊 Change Reporting

feature report

  • Generate comprehensive change reports after comment removal
  • Visual diff comparisons between original and modified files
  • Backup file management and restoration capabilities

Requirements

Python 3.12 or later.

Usage

Using Command Palette

  1. Open a Python file or select a directory in Explorer
  2. Press Ctrl+Shift+P to open Command Palette
  3. Choose one of the following commands:
    • Python Notes Manager: Check Comments - Analyze comments in selected file/directory
    • Python Notes Manager: Remove Comments - Remove comments from selected file/directory

Using Context Menu

  1. Right-click on a Python file or directory in Explorer
  2. Select either:
    • Check Python Comments
    • Remove Python Comments

Output Panel

After running any command, check the Output Panel (View → Output) and select "Python Notes Manager" from the dropdown to see detailed execution logs and results.

Configuration

The extension works out of the box with default settings. For advanced configuration, you can modify these settings in VS Code preferences:

  • pythonNotesManager.pythonPath: Custom Python interpreter path
  • pythonNotesManager.backupLocation: Custom backup directory

Features in Detail

Comment Checking

  • Identifies all types of Python comments (single-line, multi-line, inline)
  • Provides statistics on comment density
  • Highlights potential issues with commented code

Safe Comment Removal

  • Creates .bak backup files before modification
  • Preserves code functionality and structure
  • Supports incremental processing for large codebases

Change Management

  • Side-by-side diff views for easy comparison
  • Detailed change reports with timestamps
  • Option to restore from backups if needed

Supported File Types

  • .py files (Python source files)
  • Directories containing Python files
  • Recursive directory processing

Troubleshooting

Common Issues

Python not found

  • Ensure Python is installed and in your system PATH
  • Check the Output Panel for specific error messages

Permission errors

  • Make sure you have write permissions for the target files/directories
  • Run VS Code as administrator if needed (Windows)

Backup files not found

  • Backup files are created in the same directory as original files with .bak extension
  • Use system search to locate backup files if needed

Getting Help

If you encounter any issues:

  1. Check the Output Panel for detailed error information
  2. Ensure your Python environment is properly configured
  3. Verify file and directory permissions
  4. Create an issue on our GitHub repository with:
    • Error message from Output Panel
    • Steps to reproduce
    • Your environment details (OS, Python version, VS Code version)

Release Notes

Users appreciate release notes as you update your extension.

0.1.0

  • Initial release with comment checking and removal features
  • Support for individual files and directory processing
  • Integrated diff viewer and change reporting
  • Backup and restoration capabilities

Contributing

We welcome contributions! Please see our contributing guidelines for more information.

License

This extension is licensed under the GPL v3.0 License.


Enjoy cleaner Python code! 🐍✨

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft