Skip to content

sota009/leetcode-python-style-converter

Repository files navigation

🚀 LeetCode Python Style Converter

LeetCode Python Style Converter is a Chrome extension that helps align your Python code style with real-world practices. It transforms LeetCode solutions from class methods to global functions, applies built-in type hints, and converts camelCase to snake_case for better readability and consistency.

✨ Features

  • 🔄 Automatically converts camelCase to snake_case in Python functions.
  • 📜 Generates standard docstrings for Python functions.
  • 🔍 Converts type hints to lowercase for consistency.
  • 🤝 Integrates seamlessly with the LeetCode platform.

🛠️ Installation

Prerequisites

  • 🖥️ Node.js and npm or pnpm installed on your machine.
  • 🌐 Google Chrome browser.

Running Locally

  1. Clone the repository:

    git clone https://github.com/yourusername/leetcode-python-style-converter.git
    cd leetcode-python-style-converter
  2. Install dependencies:

    If you are using npm:

    npm install

    Or, if you are using pnpm:

    pnpm install
  3. Build the project:

    If you are using npm:

    npm run build

    Or, if you are using pnpm:

    pnpm build
  4. Load the extension in Chrome:

    • Open Chrome and navigate to chrome://extensions/.
    • Enable "Developer mode" by toggling the switch in the top right corner.
    • Click "Load unpacked" and select the dist directory from your project.
  5. Use the extension:

    • Navigate to a LeetCode problem page.
    • Click on the extension icon in the Chrome toolbar.
    • Use the provided options to generate code and docstrings.

🌟 Chrome Extension Page

The Chrome extension is currently under review. Please check back later for the official release on the Chrome Web Store.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published