{"id":13771187,"url":"https://github.com/DanielNoord/pydocstringformatter","last_synced_at":"2025-05-11T03:33:07.339Z","repository":{"id":37006261,"uuid":"443615321","full_name":"DanielNoord/pydocstringformatter","owner":"DanielNoord","description":"Automatically format your Python docstrings to conform with PEP 8 and PEP 257","archived":false,"fork":false,"pushed_at":"2025-04-25T05:46:50.000Z","size":542,"stargazers_count":78,"open_issues_count":14,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-25T06:35:00.347Z","etag":null,"topics":["docstrings","formatter","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanielNoord.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["DanielNoord","Pierre-Sassoulas"]}},"created_at":"2022-01-01T20:09:24.000Z","updated_at":"2025-04-25T05:46:54.000Z","dependencies_parsed_at":"2024-02-06T10:26:50.482Z","dependency_job_id":"b9dd4ed0-c194-4549-a54f-e0508394ff49","html_url":"https://github.com/DanielNoord/pydocstringformatter","commit_stats":{"total_commits":354,"total_committers":7,"mean_commits":50.57142857142857,"dds":"0.37570621468926557","last_synced_commit":"9ccbed6e33b9956016538b861d6d8d3a00fc9627"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielNoord%2Fpydocstringformatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielNoord%2Fpydocstringformatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielNoord%2Fpydocstringformatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielNoord%2Fpydocstringformatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielNoord","download_url":"https://codeload.github.com/DanielNoord/pydocstringformatter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514352,"owners_count":21920327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docstrings","formatter","python"],"created_at":"2024-08-03T17:00:48.777Z","updated_at":"2025-05-11T03:33:06.983Z","avatar_url":"https://github.com/DanielNoord.png","language":"Python","readme":"[![PyPI pyversions](https://img.shields.io/pypi/pyversions/pydocstringformatter.svg)](https://pypi.python.org/pypi/pydocstringformatter/)\n[![codecov](https://codecov.io/gh/DanielNoord/pydocstringformatter/branch/main/graph/badge.svg?token=TR61QNMBZG)](https://codecov.io/gh/DanielNoord/pydocstringformatter)\n[![Tests](https://github.com/DanielNoord/pydocstringformatter/actions/workflows/tests.yaml/badge.svg?branch=main)](https://github.com/DanielNoord/pydocstringformatter/actions/workflows/tests.yaml)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DanielNoord/pydocstringformatter/main.svg)](https://results.pre-commit.ci/latest/github/DanielNoord/pydocstringformatter/main)\n[![Documentation Status](https://readthedocs.org/projects/pydocstringformatter/badge/?version=latest)](https://pydocstringformatter.readthedocs.io/en/latest/?badge=latest)\n\n# Pydocstringformatter\n\nA tool to automatically format Python docstrings to follow recommendations from\n[`PEP 8`](https://www.python.org/dev/peps/pep-0008/) and\n[`PEP 257`](https://www.python.org/dev/peps/pep-0257/) (or other supported style\nguides.)\n\nSee [What it does](#what-it-does) for currently supported auto-formatting.\n\n**Rationale**\n\nThis project is heavily inspired by\n[`docformatter`](https://github.com/PyCQA/docformatter).\n\nWhen this project was started `docformatter` did not meet all of the requirements the\n[`pylint`](https://github.com/PyCQA/pylint) project had for its docstring formatter and\nwas no longer actively maintained (this has changed since then). Therefore, some\ncontributors of `pylint` got together and started working on our own formatter to\nfulfill our needs.\n\nWhen asked we defined the objective of the tool as:\n\n_\"A docstring formatter that follows PEP8 and PEP257 but makes some of the more\n'controversial' elements of the PEPs optional\"_\n\nSee\n[the original answer](https://github.com/DanielNoord/pydocstringformatter/issues/38).\n\nAs such, the biggest difference between the two is that `pydocstringformatter` fixes\nsome of the open issues we found in `docformatter`. In general, the output of both\nformatters (and any other docstring formatter) should be relatively similar.\n\n## How to install\n\n```shell\npip install pydocstringformatter\n```\n\n## Usage\n\n[`Click here`](https://pydocstringformatter.readthedocs.io/en/latest/usage.html) for a\nfull Usage overview.\n\n### Configuration\n\nPydocstringformatter will also read any configuration added to the\n`[tool.pydocstringformatter]` section of a `pyproject.toml` file.\n\nFor example:\n\n```toml\n[tool.pydocstringformatter]\nwrite = true\nexclude = \"**/my_dir/**,**/my_other_dir/**\"\n# Or:\nexclude = [\"**/my_dir/**\", \"**/my_other_dir/**\"]\nstrip-whitespaces = true\nsplit-summary-body = false\nnumpydoc-section-hyphen-length = false\n```\n\n#### Style\n\nPydocstringformatter can be configured to use a specific style. The default is `pep257`\nbut we support other styles as well. These can also be used at the same time. For\nexample with:\n\n```console\npydocstringformatter --style=pep257 --style=numpydoc myfile.py\n```\n\n## Pre-commit\n\nPydocstringformatter can also be used as a [pre-commit hook](https://pre-commit.com).\nAdd the following to your `.pre-commit-config.yaml` file:\n\n```yaml\n- repo: https://github.com/DanielNoord/pydocstringformatter\n  rev: SPECIFY VERSION HERE\n  hooks:\n    - id: pydocstringformatter\n```\n\n## What it does\n\nThe following examples show some of the changes pydocstringformatter will apply. For a\nfull overview of all potential changes you can check out the\n[`Usage`](https://pydocstringformatter.readthedocs.io/en/latest/usage.html) page which\nshows an up to date list of all formatters and their description.\n\n```python\n# Bad\n'''\nmy docstring'''\n\n\"\"\"    my\nmulti-line docstring      \"\"\"\n\n\"\"\"my title\n===========\n\nmy docstring\n\"\"\"\n\n\n# Good\n\"\"\"My docstring.\"\"\"\n\n\"\"\"My\nmulti-line docstring.\n\"\"\"\n\n\"\"\"My title\n===========\n\nMy docstring\n\"\"\"\n\n# With --summary-quotes-same-line\n# Bad\n\"\"\"\nMy\nmulti-line docstring\n\"\"\"\n\n# Good\n\"\"\"My\nmulti-line docstring\n\"\"\"\n```\n\n## Development\n\nFor development and contributing guidelines please see\n[`Development`](https://pydocstringformatter.readthedocs.io/en/latest/development.html).\n","funding_links":["https://github.com/sponsors/DanielNoord","https://github.com/sponsors/Pierre-Sassoulas"],"categories":["UNIX-way formatters"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDanielNoord%2Fpydocstringformatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDanielNoord%2Fpydocstringformatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDanielNoord%2Fpydocstringformatter/lists"}