Skip to content

[BUG] The AD changes starting docstring even without code changes #22

@Artemonim

Description

@Artemonim

Pre-submission Checklist

Affected Language

Python

Bug Description

The autodocstring changes the starting docstring even if the changes are only related to the ToC

Bug Severity

😭 High - Incorrect docstring generation or file corruption

Steps to Reproduce

Run the agent-docstring on file which already has a ToC generated by an outdated version of Agent Docstrings

Expected Behavior

Do not make changes if the file code has not changed.

Actual Behavior

from

"""
    --- AUTO-GENERATED DOCSTRING ---
    Table of content is automatically generated by Agent Docstrings v1.3.1
    
    Classes/Functions:
        - docx_with_image(tmp_path: Path) -> Path (line 28)
        - test_parser_captures_image_size(docx_with_image: Path) -> None (line 48)
        - test_assembler_reproduces_image_size(docx_with_image: Path, tmp_path: Path) -> None (line 63)
    --- END AUTO-GENERATED DOCSTRING ---
"""

to

"""
    --- AUTO-GENERATED DOCSTRING ---
    Table of content is automatically generated by Agent Docstrings v1.3.5
    
    Classes/Functions:
        - docx_with_image(tmp_path: Path) -> Path (line 28)
        - test_parser_captures_image_size(docx_with_image: Path) -> None (line 48)
        - test_assembler_reproduces_image_size(docx_with_image: Path, tmp_path: Path) -> None (line 63)
    --- END AUTO-GENERATED DOCSTRING ---
"""

Environment Information

Windows 11, python 3.11.9, agent-docstrings v1.3.5, pip

Error Logs/Output

Sample Files

No response

Additional Context

No response

Contribution

  • I would like to fix this bug myself
  • I can help with testing
  • I can provide domain expertise/guidance

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions