yamadashy / repopack

📦 Repopack is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, and Gemini.
MIT License
653 stars 32 forks source link

Fix for Python DocStrings #60

Open KrunchMuffin opened 3 weeks ago

yamadashy commented 3 weeks ago

Thank you for your work on handling docstrings. I apologize for not clearly explaining our concerns earlier. Let me clarify the main issues we're facing:

  1. Docstring-like strings as necessary data: While some triple-quoted strings may look like docstrings, they could actually be necessary data for the program. For example:

    hoge = """
    This looks like a docstring,
    but it's actually a multi-line string literal used in the code.
    """
  2. f-strings: We also need to ensure that f-strings (both single and multi-line) are preserved.

Given these concerns, we've decided to only remove single-line comments (starting with #) for now. This approach ensures we don't accidentally remove any necessary code or data.

I've added some test cases to verify this behavior:

I'am always open to improvements and new ideas. If you have any thoughts on how we might approach this challenge in the future, we'd love to hear them.

Thank you again for your contribution and understanding. We really appreciate your efforts to improve the project!