Skip to content

Commit

Permalink
Merge pull request #327146 from GaetanLepage/ruff
Browse files Browse the repository at this point in the history
ruff: 0.5.1 -> 0.5.2
  • Loading branch information
SuperSandro2000 authored Jul 14, 2024
2 parents 1fe5167 + 4b72d38 commit 1bbd5af
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 78 deletions.
85 changes: 45 additions & 40 deletions pkgs/development/tools/ruff/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 2 additions & 38 deletions pkgs/development/tools/ruff/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

rustPlatform.buildRustPackage rec {
pname = "ruff";
version = "0.5.1";
version = "0.5.2";

src = fetchFromGitHub {
owner = "astral-sh";
repo = "ruff";
rev = "refs/tags/${version}";
hash = "sha256-2tW/p9A7jpQg8ZmSF7KRuN6kBNKK1cfjnS9KlvnCpQA=";
hash = "sha256-g71RqbEoCpmCjd0CKkc++yv00ohoORDeMYAwYEHKhW4=";
};

cargoLock = {
Expand All @@ -31,17 +31,6 @@ rustPlatform.buildRustPackage rec {
};
};

# Fix compatibility with cargo-auditable
# https://github.com/astral-sh/ruff/pull/12275
# TODO: this will be included in the next release
patches = [
(fetchpatch {
name = "fix-compatibility-with-cargo-auditable";
url = "https://github.com/astral-sh/ruff/commit/d0298dc26d471666acc01dacdb603e3e95aca06f.patch";
hash = "sha256-Shf1Gw1pY98ZE+h9OhlpkJwq/S52EAJqUUk/uHix2fg=";
})
];

nativeBuildInputs = [
installShellFiles
];
Expand All @@ -52,31 +41,6 @@ rustPlatform.buildRustPackage rec {
darwin.apple_sdk.frameworks.CoreServices
];

# tests expect no colors
preCheck = ''
export NO_COLOR=1
'';

# Failing for an unclear reason.
# According to the maintainers, those tests are from an experimental crate that isn't actually
# used by ruff currently and can thus be safely skipped.
checkFlags = [
"--skip=semantic::tests::expression_scope"
"--skip=semantic::tests::reachability_trivial"
"--skip=semantic::types::infer::tests::follow_import_to_class"
"--skip=semantic::types::infer::tests::if_elif"
"--skip=semantic::types::infer::tests::if_elif_else"
"--skip=semantic::types::infer::tests::ifexpr_walrus"
"--skip=semantic::types::infer::tests::ifexpr_walrus_2"
"--skip=semantic::types::infer::tests::join_paths"
"--skip=semantic::types::infer::tests::literal_int_arithmetic"
"--skip=semantic::types::infer::tests::maybe_unbound"
"--skip=semantic::types::infer::tests::narrow_none"
"--skip=semantic::types::infer::tests::resolve_base_class_by_name"
"--skip=semantic::types::infer::tests::resolve_module_member"
"--skip=semantic::types::infer::tests::resolve_visible_def"
];

postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ruff \
--bash <($out/bin/ruff generate-shell-completion bash) \
Expand Down

0 comments on commit 1bbd5af

Please sign in to comment.