{"repo":"omnilib/ufmt","free":true,"listed":false,"github":"https://github.com/omnilib/ufmt","clone":"git clone https://github.com/omnilib/ufmt.git","description":"Safe, atomic formatting with black and µsort","language":"Python","stars":110,"topics":["python","formatter","formatting","black","usort","hacktoberfest"],"license":"MIT","category":"dev-tools","readme_excerpt":"µfmt Safe, atomic formatting with [black][] and [µsort][] µfmt is a safe, atomic code formatter for Python built on top of [black][] and [µsort][]: Black makes code review faster by producing the smallest diffs possible. Blackened code looks the same regardless of the project you’re reading. μsort is a safe, minimal import sorter. Its primary goal is to make no “dangerous” changes to code, and to make no changes on code style. µfmt formats files in-memory, first with µsort and then with black, before writing any changes back to disk. This enables a combined, atomic step in CI/CD workflows for checking or formatting files, without any chance of conflict or intermediate changes between the import sorter and the code formatter. Install ------- µfmt requires Python 3.10 or newer. You can install it from PyPI: If you want to prevent unexpected formatting changes that can break your CI workflow, make sure to pin your transitive dependencies–including black, µsort, and µfmt–to your preferred versions. If you use requirements.txt , this might look like: Usage ----- To format one or more files or directories in place: To validate files are formatted correctly, like for CI workflows: To validate formatting and generate a diff of necessary changes: Integrations ------------ See the user guide for details on each integration. GitHub Actions µfmt provides a GitHub Action that can be added to an existing workflow, or as a separate workflow or job, to enforce proper formatting in pull reque","default_branch":null,"files":null,"tree":[],"storefront":"/r/omnilib","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/omnilib/ufmt/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}