From 7bfdb06cfb03fbcac4d13ea6fbc71985966b983a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 29 Apr 2024 18:05:28 +0200 Subject: [PATCH 1/3] python311Packages.yamlfix: refactor --- pkgs/development/python-modules/yamlfix/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/yamlfix/default.nix b/pkgs/development/python-modules/yamlfix/default.nix index 26b39ed87ed5..6119faec1dd8 100644 --- a/pkgs/development/python-modules/yamlfix/default.nix +++ b/pkgs/development/python-modules/yamlfix/default.nix @@ -26,12 +26,12 @@ buildPythonPackage rec { hash = "sha256-nadyBIzXHbWm0QvympRaYU38tuPJ3TPJg8EbvVv+4L0="; }; - nativeBuildInputs = [ + build-system = [ setuptools pdm-backend ]; - propagatedBuildInputs = [ + dependencies = [ click maison ruyaml @@ -59,16 +59,16 @@ buildPythonPackage rec { "test_corrects_one_file" "test_corrects_three_files" "test_empty_list_inline_comment_indentation" + "test_enforcing_flow_style_together_with_adjustable_newlines" "test_find_files" "test_fix_code_converts_non_valid_false_booleans" "test_ignores_correct_files" "test_include_exclude_files" "test_read_prefixed_environment_variables" "test_section_whitelines" - "test_whitelines" "test_sequence_style_env_enum_parsing" "test_verbose_option" - "test_enforcing_flow_style_together_with_adjustable_newlines" + "test_whitelines" ]; meta = with lib; { From 5cf6ac148f65d2c61dd545e6c422bcbff99a1bc9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 29 Apr 2024 19:53:57 +0200 Subject: [PATCH 2/3] python311Packages.yamlfix: disable failing tests --- .../development/python-modules/yamlfix/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/development/python-modules/yamlfix/default.nix b/pkgs/development/python-modules/yamlfix/default.nix index 6119faec1dd8..1e47d1f1ba36 100644 --- a/pkgs/development/python-modules/yamlfix/default.nix +++ b/pkgs/development/python-modules/yamlfix/default.nix @@ -53,6 +53,7 @@ buildPythonPackage rec { disabledTests = [ # AssertionError: assert ... Fixed in... + "test_anchors_and_aliases_with_duplicate_merge_keys" "test_check_one_file_no_changes" "test_config_parsing" "test_corrects_code_from_stdin" @@ -61,11 +62,24 @@ buildPythonPackage rec { "test_empty_list_inline_comment_indentation" "test_enforcing_flow_style_together_with_adjustable_newlines" "test_find_files" + "test_fix_code_adds_header" "test_fix_code_converts_non_valid_false_booleans" + "test_fix_code_corrects_indentation_on_lists" + "test_fix_code_doesnt_change_double_exclamation_marks" + "test_fix_code_doesnt_double_the_header" + "test_fix_code_functions_emit_debug_logs" + "test_fix_code_parses_files_with_multiple_documents" + "test_fix_code_preserves_indented_comments" + "test_fix_code_respects_apostrophes_for_truthy_substitutions" + "test_fix_files_can_process_string_arguments" "test_ignores_correct_files" "test_include_exclude_files" + "test_quote_values_config_and_preserve_quotes" "test_read_prefixed_environment_variables" "test_section_whitelines" + "test_sequence_block_style_config" + "test_sequence_keep_style_config" + "test_sequence_block_style_enforcement_for_lists_with_comments" "test_sequence_style_env_enum_parsing" "test_verbose_option" "test_whitelines" From 6db53704c053963be9f6daf537746da25d0ad319 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 29 Apr 2024 20:41:39 +0200 Subject: [PATCH 3/3] python312Packages.yamlfix: ignore pytest warning --- .../python-modules/yamlfix/default.nix | 36 +++---------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/pkgs/development/python-modules/yamlfix/default.nix b/pkgs/development/python-modules/yamlfix/default.nix index 1e47d1f1ba36..ee3a15d11bd0 100644 --- a/pkgs/development/python-modules/yamlfix/default.nix +++ b/pkgs/development/python-modules/yamlfix/default.nix @@ -6,6 +6,7 @@ , pdm-backend , pytest-freezegun , pytest-xdist +, pytest , pytestCheckHook , pythonOlder , ruyaml @@ -51,38 +52,9 @@ buildPythonPackage rec { "yamlfix" ]; - disabledTests = [ - # AssertionError: assert ... Fixed in... - "test_anchors_and_aliases_with_duplicate_merge_keys" - "test_check_one_file_no_changes" - "test_config_parsing" - "test_corrects_code_from_stdin" - "test_corrects_one_file" - "test_corrects_three_files" - "test_empty_list_inline_comment_indentation" - "test_enforcing_flow_style_together_with_adjustable_newlines" - "test_find_files" - "test_fix_code_adds_header" - "test_fix_code_converts_non_valid_false_booleans" - "test_fix_code_corrects_indentation_on_lists" - "test_fix_code_doesnt_change_double_exclamation_marks" - "test_fix_code_doesnt_double_the_header" - "test_fix_code_functions_emit_debug_logs" - "test_fix_code_parses_files_with_multiple_documents" - "test_fix_code_preserves_indented_comments" - "test_fix_code_respects_apostrophes_for_truthy_substitutions" - "test_fix_files_can_process_string_arguments" - "test_ignores_correct_files" - "test_include_exclude_files" - "test_quote_values_config_and_preserve_quotes" - "test_read_prefixed_environment_variables" - "test_section_whitelines" - "test_sequence_block_style_config" - "test_sequence_keep_style_config" - "test_sequence_block_style_enforcement_for_lists_with_comments" - "test_sequence_style_env_enum_parsing" - "test_verbose_option" - "test_whitelines" + pytestFlagsArray = [ + "-W" + "ignore::DeprecationWarning" ]; meta = with lib; {