Merge pull request #321212 from fabaff/ufmt-bump

python312Packages.ufmt: 2.1.0 -> 2.7.0
This commit is contained in:
Fabian Affolter 2024-06-20 20:20:13 +02:00 committed by GitHub
commit 190e9e5ee0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 3011 additions and 8 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
{
lib,
stdenv,
buildPythonPackage,
cargo,
darwin,
fetchFromGitHub,
pythonOlder,
rustc,
rustPlatform,
ufmt,
usort,
}:
buildPythonPackage rec {
pname = "ruff-api";
version = "0.0.6";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "amyreese";
repo = "ruff-api";
rev = "refs/tags/v${version}";
hash = "sha256-nZKf0LpCoYwWoLDGoorJ+zQSLyuxfWu3LOygocVlYSs=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"ruff-0.3.7" = "sha256-PS4YJpVut+KtEgSlTVtoVdlu6FVipPIzsl01/Io5N64=";
};
};
nativeBuildInputs = [
cargo
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
rustc
];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.CoreServices
];
# Tests have issues at the moment, check with next update
doCheck = false;
pythonImportsCheck = [ "ruff_api" ];
meta = with lib; {
description = "Experimental Python API for Ruff";
homepage = "https://github.com/amyreese/ruff-api";
changelog = "https://github.com/amyreese/ruff-api/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -7,9 +7,11 @@
flit-core,
libcst,
moreorless,
pygls,
pythonOlder,
tomlkit,
trailrunner,
ruff-api,
typing-extensions,
unittestCheckHook,
usort,
@ -17,21 +19,21 @@
buildPythonPackage rec {
pname = "ufmt";
version = "2.1.0";
format = "pyproject";
version = "2.7.0";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.";
src = fetchFromGitHub {
owner = "omnilib";
repo = "ufmt";
rev = "refs/tags/v${version}";
hash = "sha256-eQIbSC0Oxi6JD7/3o2y9f+KhT8GIiFiYiV4A3QBoWl0=";
hash = "sha256-hIbzW7yDqk8siob+RhcnbOonkl+67sl/IGHimIeMM+Q=";
};
nativeBuildInputs = [ flit-core ];
build-system = [ flit-core ];
propagatedBuildInputs = [
dependencies = [
black
click
libcst
@ -42,16 +44,23 @@ buildPythonPackage rec {
usort
];
nativeCheckInputs = [ unittestCheckHook ];
passthru.optional-dependencies = {
lsp = [ pygls ];
ruff = [ ruff-api ];
};
nativeCheckInputs = [
unittestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [ "ufmt" ];
meta = with lib; {
description = "Safe, atomic formatting with black and usort";
mainProgram = "ufmt";
homepage = "https://github.com/omnilib/ufmt";
changelog = "https://github.com/omnilib/ufmt/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
mainProgram = "ufmt";
};
}

View File

@ -13586,6 +13586,8 @@ self: super: with self; {
rubymarshal = callPackage ../development/python-modules/rubymarshal { };
ruff-api = callPackage ../development/python-modules/ruff-api { };
ruffus = callPackage ../development/python-modules/ruffus { };
rules = callPackage ../development/python-modules/rules { };