{"id":13771518,"url":"https://github.com/myint/pyformat","last_synced_at":"2025-04-09T17:25:42.870Z","repository":{"id":7634020,"uuid":"8993792","full_name":"myint/pyformat","owner":"myint","description":"Formats Python code to follow a consistent style","archived":false,"fork":false,"pushed_at":"2024-01-01T00:20:53.000Z","size":81,"stargazers_count":94,"open_issues_count":7,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-02T13:01:52.572Z","etag":null,"topics":["formatter","python"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/pyformat","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myint.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst"}},"created_at":"2013-03-24T21:45:30.000Z","updated_at":"2024-11-28T16:26:57.000Z","dependencies_parsed_at":"2024-01-12T21:19:50.002Z","dependency_job_id":"cdec1e7d-ff42-4864-b64e-32f824d1c108","html_url":"https://github.com/myint/pyformat","commit_stats":{"total_commits":196,"total_committers":3,"mean_commits":65.33333333333333,"dds":"0.056122448979591844","last_synced_commit":"7293e4dd46433b56bb9224ce0a19f616a231c0ed"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myint%2Fpyformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myint%2Fpyformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myint%2Fpyformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myint%2Fpyformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myint","download_url":"https://codeload.github.com/myint/pyformat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075960,"owners_count":21043679,"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":["formatter","python"],"created_at":"2024-08-03T17:00:52.347Z","updated_at":"2025-04-09T17:25:42.852Z","avatar_url":"https://github.com/myint.png","language":"Python","readme":"========\npyformat\n========\n\n.. image:: https://travis-ci.org/myint/pyformat.svg?branch=master\n    :target: https://travis-ci.org/myint/pyformat\n    :alt: Build status\n\n*pyformat* formats Python code to follow a consistent style.\n\n\nFeatures\n========\n\n- Formats code to follow the PEP 8 style guide (using autopep8_).\n- Removes unused imports (using autoflake_).\n- Formats docstrings to follow PEP 257 (using docformatter_).\n- Makes strings all use the same type of quote where possible (using unify_).\n\n\nInstallation\n============\n\nFrom pip::\n\n    $ pip install --upgrade pyformat\n\n\nExample\n=======\n\nAfter running::\n\n    $ pyformat --in-place example.py\n\nThis code:\n\n.. code-block:: python\n\n   def launch_rocket   ():\n\n\n\n       \"\"\"Launch\n   the\n   rocket. Go colonize space.\"\"\"\n\n   def factorial(x):\n       '''\n\n       Return x factorial.\n\n       This uses math.factorial.\n\n       '''\n       import math\n       import re\n       import os\n       return math.factorial( x );\n   def print_factorial(x):\n       \"\"\"Print x factorial\"\"\"\n       print( factorial(x)  )\n   def main():\n       \"\"\"Main\n       function\"\"\"\n       print_factorial(5)\n       if factorial(10):\n         launch_rocket()\n\nGets formatted into this:\n\n.. code-block:: python\n\n   def launch_rocket():\n       \"\"\"Launch the rocket.\n\n       Go colonize space.\n\n       \"\"\"\n\n\n   def factorial(x):\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 function.\"\"\"\n       print_factorial(5)\n       if factorial(10):\n           launch_rocket()\n\n\n.. _autoflake: https://github.com/myint/autoflake\n.. _autopep8: https://github.com/hhatto/autopep8\n.. _docformatter: https://github.com/myint/docformatter\n.. _unify: https://github.com/myint/unify\n","funding_links":[],"categories":["Python","Improvements and wrappers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyint%2Fpyformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyint%2Fpyformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyint%2Fpyformat/lists"}