कंटेंट पर जाएँ
TakoAPI
स्किल्स पर वापस

neo-py2py3-converter

martinforsulu द्वारा

Communication
—अभी तक कोई रेटिंग नहीं
आपकी रेटिंग

संक्षिप्त

Automatically converts legacy Python 2 code to Python 3 with compatibility checks and test generation.

विवरण

यह स्किल क्या करती है

Converts Python 2 source code to Python 3 syntax, covering common migration patterns like print statements, raw_input, xrange, and dict methods. Produces a compatibility report flagging patterns that need manual review and optionally generates pytest test files for the converted code.

Handles the full conversion-plus-report-plus-test workflow in one step rather than running 2to3, writing tests, and reviewing edge cases separately.

इसे कब इस्तेमाल करें

  • Migrating a legacy Django or Flask app off Python 2
  • Batch-upgrading internal scripts before a server OS upgrade
  • Checking a codebase for Python 2 remnants before CI enforcement
  • Generating tests alongside converted files to verify behavior
  • Getting a compatibility report before committing to a full migration

उदाहरण वर्कफ़्लो

इनपुट

User asks: Convert this Python 2 script to Python 3 and generate tests

एजेंट
  1. 1

    Writes the Python 2 code to a temporary input file

  2. 2

    Runs node scripts/cli.js convert --input file.py --output converted.py --generate-tests

  3. 3

    Reads the converted code and compatibility report from output

  4. 4

    Reads the generated pytest file

  5. 5

    Presents converted code, report warnings, and test file to user

आउटपुट

Python 3 source file, a compatibility report listing any patterns needing manual review, and a companion pytest file validating the converted functions

इंस्टॉलेशन

clawhub install martinforsulu/neo-py2py3-converter

CLI कमांड चलाएँ, या प्रॉम्प्ट को Claude Code, Cursor, Codex या जो भी कोडिंग एजेंट आप इस्तेमाल करते हैं उसमें पेस्ट करें।

लिंक