Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Python DocStrings #60

Closed
wants to merge 2 commits into from
Closed

Conversation

KrunchMuffin
Copy link

No description provided.

@yamadashy
Copy link
Owner

yamadashy commented Aug 25, 2024

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:

  • 7bc9c5b
  • Preserving multi-line string literals that might look like docstrings
  • Ensuring f-strings (both single and multi-line) are not removed

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!

@yamadashy
Copy link
Owner

Thank you, @KrunchMuffin, for your contribution to improve Python DocStrings handling. We really appreciate your effort to address this issue.

I wanted to let you know that a similar enhancement has already been implemented and released as part of version 0.1.37. This was done through another pull request that addressed Python comment and docstring removal comprehensively.
#81

And the release notes for version 0.1.37 here:
https://github.com/yamadashy/repopack/releases/tag/v0.1.37

Your attention to this issue has been valuable, and it's great to see community members like you actively working to improve Repopack. Although this specific PR won't be merged, your contribution has helped validate the importance of this feature.

Given that this issue has been addressed in the latest release, I'll be closing this PR. However, please don't let this discourage you. Your involvement is highly appreciated, and we look forward to your future contributions to other areas of the project!

Thank you again for your effort and understanding.

@yamadashy yamadashy closed this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants