{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/4"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/3"}],"enrichment":{"capability":"\u03bcsort sorts Python imports within detected blocks while preserving code safety by avoiding reordering across statements that separate import groups.","skillfed_tags":["import-sorting","code-formatter","pre-commit-hook"],"use_cases":["Enforce consistent import ordering in CI pipelines using `usort check` without modifying code","Automatically sort imports in files or directories in-place with `usort format` before committing","Generate diffs of import changes with `usort diff` to review before applying","Integrate import sorting into pre-commit hooks to maintain order on every commit","Sort imports safely in codebases where import order affects behavior due to side effects"],"what_it_does":"\u03bcsort is a Python import sorter designed to make minimal, safe changes to code. Rather than reordering all imports globally, it detects distinct blocks of imports separated by non-import statements and sorts only within those blocks. This conservative approach avoids the risk of breaking code where import order matters due to side effects or dependencies between imports.\n\nWithin each block, \u03bcsort groups imports by source (standard library, third-party, first-party, relative) and sorts lexicographically. It respects skip directives like `#usort:skip` and `#isort:skip` to exclude specific imports from reordering. The tool integrates with pre-commit workflows via a standard hook.","worth_installing":"Yes. \u03bcsort is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem\u2014safe import sorting that respects code structure. It is a good fit if you want conservative import reordering that avoids breaking changes. The MIT license poses no restrictions."},"id":"usort","links":{"html":"https://skillfed.io/packages/usort","md":"https://skillfed.io/packages/usort.md","pypi":"https://pypi.org/project/usort/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-01-13","license_spdx":null,"license_treatment":"permissive","name":"usort","python_support":"supports_current","summary":"Safe, minimal import sorting"},"popularity":{"monthly_downloads":2519103,"position":3026,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.1.3"}
