python3Packages.ufmt: cleanup

This commit is contained in:
Gaetan Lepage
2025-10-24 14:12:45 +00:00
parent b1e6f565ea
commit 112f4ba4f3
@@ -1,20 +1,28 @@
{
lib,
black,
buildPythonPackage,
click,
fetchFromGitHub,
# build-system
flit-core,
# dependencies
black,
click,
libcst,
moreorless,
pygls,
pythonOlder,
tomlkit,
trailrunner,
ruff-api,
typing-extensions,
unittestCheckHook,
usort,
# optional-dependencies
pygls,
ruff-api,
# tests
unittestCheckHook,
versionCheckHook,
}:
buildPythonPackage rec {
@@ -22,8 +30,6 @@ buildPythonPackage rec {
version = "2.8.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "omnilib";
repo = "ufmt";
@@ -51,17 +57,19 @@ buildPythonPackage rec {
nativeCheckInputs = [
unittestCheckHook
versionCheckHook
]
++ lib.flatten (builtins.attrValues optional-dependencies);
versionCheckProgramArg = "--version";
pythonImportsCheck = [ "ufmt" ];
meta = with lib; {
meta = {
description = "Safe, atomic formatting with black and usort";
homepage = "https://github.com/omnilib/ufmt";
changelog = "https://github.com/omnilib/ufmt/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "ufmt";
};
}