{"id":16754573,"url":"https://github.com/marcogorelli/auto-walrus","last_synced_at":"2025-04-12T22:27:42.752Z","repository":{"id":60997515,"uuid":"547198126","full_name":"MarcoGorelli/auto-walrus","owner":"MarcoGorelli","description":"Automatically use the awesome walrus operator","archived":false,"fork":false,"pushed_at":"2024-10-28T22:04:42.000Z","size":156,"stargazers_count":107,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T21:59:19.492Z","etag":null,"topics":["formatting","linting","python","walrus-operator"],"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/MarcoGorelli.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-10-07T09:39:49.000Z","updated_at":"2024-10-25T20:55:41.000Z","dependencies_parsed_at":"2024-01-12T20:49:50.931Z","dependency_job_id":"f531f5a2-06bb-4dda-b21c-940a73b111c7","html_url":"https://github.com/MarcoGorelli/auto-walrus","commit_stats":{"total_commits":59,"total_committers":4,"mean_commits":14.75,"dds":0.4576271186440678,"last_synced_commit":"803192698951433f710357b47982a23c63a07f4a"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoGorelli%2Fauto-walrus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoGorelli%2Fauto-walrus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoGorelli%2Fauto-walrus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoGorelli%2Fauto-walrus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcoGorelli","download_url":"https://codeload.github.com/MarcoGorelli/auto-walrus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248639180,"owners_count":21137794,"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":["formatting","linting","python","walrus-operator"],"created_at":"2024-10-13T03:05:19.448Z","updated_at":"2025-04-12T22:27:42.733Z","avatar_url":"https://github.com/MarcoGorelli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\nauto-walrus\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"458\" alt=\"auto-walrus\" src=\"https://user-images.githubusercontent.com/33491632/195613331-f7442140-09da-4376-90aa-2ac4aaa242fa.png\"\u003e\n\u003c/p\u003e\n\nauto-walrus\n===========\n[![Build Status](https://github.com/MarcoGorelli/auto-walrus/workflows/tox/badge.svg)](https://github.com/MarcoGorelli/auto-walrus/actions?workflow=tox)\n[![Coverage](https://codecov.io/gh/MarcoGorelli/auto-walrus/branch/main/graph/badge.svg)](https://codecov.io/gh/MarcoGorelli/auto-walrus)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/MarcoGorelli/auto-walrus/main.svg)](https://results.pre-commit.ci/latest/github/MarcoGorelli/auto-walrus/main)\n\n\nA tool and pre-commit hook to automatically apply the awesome walrus operator.\n\n\n## Installation\n\n```console\npip install auto-walrus\n```\n\n## Usage as a pre-commit hook\n\nSee [pre-commit](https://github.com/pre-commit/pre-commit) for instructions\n\nSample `.pre-commit-config.yaml`:\n\n```yaml\n-   repo: https://github.com/MarcoGorelli/auto-walrus\n    rev: 0.3.4\n    hooks:\n    -   id: auto-walrus\n```\n\n## Command-line example\n\n```console\nauto-walrus myfile.py\n```\n\n```diff\n-    n = 10\n-    if n \u003e 3:\n+    if (n := 10) \u003e 3:\n         print(n)\n```\n\n## Configuration\n\nUsing the walrus operator can result in longer lines. Lines longer than what you\npass to ``--line-length`` won't be rewritten to use walrus operators.\n\nE.g.\n```\nauto-walrus myfile_1.py myfile_2.py --line-length 89\n```\n\nLines with comments won't be rewritten.\n\n## Used by\n\nTo my great surprise, this is being used by:\n\n- https://github.com/python-graphblas/python-graphblas\n- https://github.com/Remi-Gau/bids2cite\n- https://github.com/TheAlgorithms/Python\n- https://github.com/apache/superset\n\nAnyone else? Please let me know, or you can open a pull request to add yourself.\n\n## Testimonials\n\n**Christopher Redwine**, [Senior Software Engineer at TechnologyAdvice](https://github.com/chrisRedwine)\n\n\u003e hmm, i dunno about this one chief\n\n**Michael Kennedy \u0026 Brian Okken**, [hosts of the Python Bytes podcast](https://pythonbytes.fm/):\n\n\u003e I kind of like this being separate from other tools\n\n**Someone on Discord**\n\n\u003e you're a monster\n\n**Will McGugan**, [CEO / Founder of http://Textualize.io](https://www.willmcgugan.com/):\n\n\u003e Embrace the Walrus!\n\n## Credits\n\nLogo by [lion_space](https://www.fiverr.com/lion_space)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcogorelli%2Fauto-walrus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcogorelli%2Fauto-walrus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcogorelli%2Fauto-walrus/lists"}