{ "info": { "author": "Steven Myint", "author_email": "", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "============\ndocformatter\n============\n\nFormats docstrings to follow `PEP 257`_.\n\n.. _`PEP 257`: http://www.python.org/dev/peps/pep-0257/\n\n.. image:: https://travis-ci.org/myint/docformatter.svg?branch=master\n :target: https://travis-ci.org/myint/docformatter\n :alt: Build status\n\nWarning\n========\nThis fork exists to build a version of docformatter that hasn't been released yet and push it to our PyPi mirror so we don't have to install it from Github. We need this because the unreleased version added `-c` to check if the doc strings are properly formatted.\n\nFeatures\n========\n\n*docformatter* currently automatically formats docstrings to follow a\nsubset of the PEP 257 conventions. Below are the relevant items quoted\nfrom PEP 257.\n\n- For consistency, always use triple double quotes around docstrings.\n- Triple quotes are used even though the string fits on one line.\n- Multi-line docstrings consist of a summary line just like a one-line\n docstring, followed by a blank line, followed by a more elaborate\n description.\n- Unless the entire docstring fits on a line, place the closing quotes\n on a line by themselves.\n\ndocformatter also handles some of the PEP 8 conventions.\n\n- Don't write string literals that rely on significant trailing\n whitespace. Such trailing whitespace is visually indistinguishable\n and some editors (or more recently, reindent.py) will trim them.\n\n\nInstallation\n============\n\nFrom pip::\n\n $ pip install --upgrade docformatter\n\n\nExample\n=======\n\nAfter running::\n\n $ docformatter --in-place example.py\n\nthis code\n\n.. code-block:: python\n\n \"\"\" Here are some examples.\n\n This module docstring should be dedented.\"\"\"\n\n\n def launch_rocket():\n \"\"\"Launch\n the\n rocket. Go colonize space.\"\"\"\n\n\n def factorial(x):\n '''\n\n Return x factorial.\n\n This uses math.factorial.\n\n '''\n import math\n return math.factorial(x)\n\n\n def print_factorial(x):\n \"\"\"Print x factorial\"\"\"\n print(factorial(x))\n\n\n def main():\n \"\"\"Main\n function\"\"\"\n print_factorial(5)\n if factorial(10):\n launch_rocket()\n\n\ngets formatted into this\n\n.. code-block:: python\n\n \"\"\"Here are some examples.\n\n This module docstring should be dedented.\n \"\"\"\n\n\n def launch_rocket():\n \"\"\"Launch the rocket.\n\n Go colonize space.\n \"\"\"\n\n\n def factorial(x):\n \"\"\"Return x factorial.\n\n This uses math.factorial.\n \"\"\"\n import math\n return math.factorial(x)\n\n\n def print_factorial(x):\n \"\"\"Print x factorial.\"\"\"\n print(factorial(x))\n\n\n def main():\n \"\"\"Main function.\"\"\"\n print_factorial(5)\n if factorial(10):\n launch_rocket()\n\n\nOptions\n=======\n\nBelow is the help output::\n\n usage: docformatter [-h] [-i | -c] [-r] [--wrap-summaries length]\n [--wrap-descriptions length] [--blank]\n [--pre-summary-newline] [--make-summary-multi-line]\n [--force-wrap] [--range line line] [--version]\n files [files ...]\n\n Formats docstrings to follow PEP 257.\n\n positional arguments:\n files files to format or '-' for standard in\n\n optional arguments:\n -h, --help show this help message and exit\n -i, --in-place make changes to files instead of printing diffs\n -c, --check only check and report incorrectly formatted files\n -r, --recursive drill down directories recursively\n --wrap-summaries length\n wrap long summary lines at this length; set to 0 to\n disable wrapping (default: 79)\n --wrap-descriptions length\n wrap descriptions at this length; set to 0 to disable\n wrapping (default: 72)\n --blank add blank line after description\n --pre-summary-newline\n add a newline before the summary of a multi-line\n docstring\n --make-summary-multi-line\n add a newline before and after the summary of a one-\n line docstring\n --force-wrap force descriptions to be wrapped even if it may result\n in a mess\n --range line line apply docformatter to docstrings between these lines;\n line numbers are indexed at 1\n --version show program's version number and exit\n\n\nPossible exit codes:\n\n- **1** - if any error encountered\n- **3** - if any file needs to be formatted (in ``--check`` mode)\n\nWrapping descriptions\n=====================\n\ndocformatter will wrap descriptions, but only in simple cases. If there is text\nthat seems like a bulleted/numbered list, docformatter will leave the\ndescription as is::\n\n - Item one.\n - Item two.\n - Item three.\n\nThis prevents the risk of the wrapping turning things into a mess. To force\neven these instances to get wrapped use ``--force-wrap``.\n\n\nIssues\n======\n\nBugs and patches can be reported on the `GitHub page`_.\n\n.. _`GitHub page`: https://github.com/myint/docformatter/issues\n\n\nLinks\n=====\n\n* Coveralls_\n\n.. _`Coveralls`: https://coveralls.io/r/myint/docformatter", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/myint/docformatter", "keywords": "PEP 257,pep257,style,formatter,docstrings", "license": "Expat License", "maintainer": "", "maintainer_email": "", "name": "sl-docformatter", "package_url": "https://pypi.org/project/sl-docformatter/", "platform": "", "project_url": "https://pypi.org/project/sl-docformatter/", "project_urls": { "Homepage": "https://github.com/myint/docformatter" }, "release_url": "https://pypi.org/project/sl-docformatter/1.4/", "requires_dist": null, "requires_python": "", "summary": "Formats docstrings to follow PEP 257.", "version": "1.4" }, "last_serial": 5988369, "releases": { "1.2": [ { "comment_text": "", "digests": { "md5": "ac8816c8a042fc89e1f253c929376b0a", "sha256": "d3cc59b2fef0d5ddc9926c9ae91b34f617ac0f0663e882f5f649845be0a0bcdd" }, "downloads": -1, "filename": "sl-docformatter-1.2.tar.gz", "has_sig": false, "md5_digest": "ac8816c8a042fc89e1f253c929376b0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17748, "upload_time": "2019-07-12T06:53:17", "url": "https://files.pythonhosted.org/packages/ab/f3/d4afe8f3fc5d7a509c3315d6e43493d7852a9f400ba3b586d58981d8a595/sl-docformatter-1.2.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "bb59b75d77cd2104c601dd2ea0972fdf", "sha256": "983ea426e49d1adb2a59cde7c5eafc34a4f6deaf89c92862bde0c2cebc83849e" }, "downloads": -1, "filename": "sl-docformatter-1.4.tar.gz", "has_sig": false, "md5_digest": "bb59b75d77cd2104c601dd2ea0972fdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18457, "upload_time": "2019-10-17T08:31:26", "url": "https://files.pythonhosted.org/packages/0a/b3/7d195f52d0130362498c2de5d75f7591f1755fb129cab9cf9b8d3d94fbaa/sl-docformatter-1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bb59b75d77cd2104c601dd2ea0972fdf", "sha256": "983ea426e49d1adb2a59cde7c5eafc34a4f6deaf89c92862bde0c2cebc83849e" }, "downloads": -1, "filename": "sl-docformatter-1.4.tar.gz", "has_sig": false, "md5_digest": "bb59b75d77cd2104c601dd2ea0972fdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18457, "upload_time": "2019-10-17T08:31:26", "url": "https://files.pythonhosted.org/packages/0a/b3/7d195f52d0130362498c2de5d75f7591f1755fb129cab9cf9b8d3d94fbaa/sl-docformatter-1.4.tar.gz" } ] }