{"id":18468738,"url":"https://github.com/pycqa/flake8-commas","last_synced_at":"2025-04-04T10:08:45.364Z","repository":{"id":46430525,"uuid":"48100352","full_name":"PyCQA/flake8-commas","owner":"PyCQA","description":"Flake8 extension for enforcing trailing commas in python","archived":false,"fork":false,"pushed_at":"2024-05-16T19:52:23.000Z","size":158,"stargazers_count":133,"open_issues_count":3,"forks_count":30,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-28T09:07:11.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyCQA.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"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}},"created_at":"2015-12-16T09:25:13.000Z","updated_at":"2025-02-01T13:33:44.000Z","dependencies_parsed_at":"2024-06-18T14:04:44.270Z","dependency_job_id":"98856490-14b8-4ae5-8637-0cbbbee573d0","html_url":"https://github.com/PyCQA/flake8-commas","commit_stats":{"total_commits":185,"total_committers":15,"mean_commits":"12.333333333333334","dds":0.7135135135135136,"last_synced_commit":"3aa9b67d067154b5b3ffb183dee632404cd4e301"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fflake8-commas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fflake8-commas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fflake8-commas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fflake8-commas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyCQA","download_url":"https://codeload.github.com/PyCQA/flake8-commas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157283,"owners_count":20893220,"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":[],"created_at":"2024-11-06T10:08:03.066Z","updated_at":"2025-04-04T10:08:45.347Z","avatar_url":"https://github.com/PyCQA.png","language":"Python","readme":"Flake8 Extension to enforce better comma placement.\n===================================================\n\n|Build Status| |PyPI - Version|\n\nUsage\n-----\n\nIf you are using flake8 it's as easy as:\n\n.. code:: shell\n\n    pip install flake8-commas\n\nNow you can avoid those annoying merge conflicts on dictionary and list diffs.\n\nErrors\n------\n\nDifferent versions of python require commas in different places. Ignore the\nerrors for languages you don't use in your flake8 config:\n\n+------+-----------------------------------------+\n| Code | message                                 |\n+======+=========================================+\n| C812 | missing trailing comma                  |\n+------+-----------------------------------------+\n| C813 | missing trailing comma in Python 3      |\n+------+-----------------------------------------+\n| C814 | missing trailing comma in Python 2      |\n+------+-----------------------------------------+\n| C815 | missing trailing comma in Python 3.5+   |\n+------+-----------------------------------------+\n| C816 | missing trailing comma in Python 3.6+   |\n+------+-----------------------------------------+\n| C818 | trailing comma on bare tuple prohibited |\n+------+-----------------------------------------+\n| C819 | trailing comma prohibited               |\n+------+-----------------------------------------+\n\nExamples\n--------\n\n.. code:: Python\n\n    lookup_table = {\n        'key1': 'value',\n        'key2': 'something'  # \u003c-- missing a trailing comma\n    }\n\n    json_data = json.dumps({\n        \"key\": \"value\",\n    }),                      # \u003c-- incorrect trailing comma. json_data is now a tuple. Likely by accident.\n\nRelated tools\n-------------\n\nYou may wish to consider one of the following tools alongside or instead of ``flake8-commas``.\n\nFor automatic insertion of commas, though noting that these tools may implement\ndifferent rules around where commas should be placed:\n\n* `black \u003chttps://pypi.org/project/black/\u003e`_, the uncompromising Python code formatter\n* `add-trailing-comma \u003chttps://github.com/asottile/add-trailing-comma\u003e`_, which can do comma insertion automatically\n\n\n.. |Build Status| image:: https://github.com/PyCQA/flake8-commas/actions/workflows/.github/workflows/tests.yml/badge.svg?branch=main\n   :target: https://github.com/PyCQA/flake8-commas/actions?query=branch%3Amain\n\n.. |PyPI - Version| image:: https://img.shields.io/pypi/v/flake8-commas\n   :target: https://pypi.org/project/flake8-commas/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycqa%2Fflake8-commas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpycqa%2Fflake8-commas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycqa%2Fflake8-commas/lists"}