From ff225beeae6593f7c2d3f4c4f2a63bee448d3e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 31 Aug 2021 20:20:53 +0200 Subject: [PATCH] python39Packages.python-lsp-server: disable failing test after pylint update, format, move postPatch after src --- .../python-lsp-server/default.nix | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index 5d13a50a11fd..60215fa0b4cd 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -45,6 +45,12 @@ buildPythonPackage rec { sha256 = "sha256-TyXKlXeXMyq+bQq9ngDm0SuW+rAhDlOVlC3mDI1THwk="; }; + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ + --replace "--cov pylsp --cov test" "" + ''; + propagatedBuildInputs = [ jedi pluggy @@ -52,14 +58,14 @@ buildPythonPackage rec { setuptools ujson ] ++ lib.optional withAutopep8 autopep8 - ++ lib.optional withFlake8 flake8 - ++ lib.optional withMccabe mccabe - ++ lib.optional withPycodestyle pycodestyle - ++ lib.optional withPydocstyle pydocstyle - ++ lib.optional withPyflakes pyflakes - ++ lib.optional withPylint pylint - ++ lib.optional withRope rope - ++ lib.optional withYapf yapf; + ++ lib.optional withFlake8 flake8 + ++ lib.optional withMccabe mccabe + ++ lib.optional withPycodestyle pycodestyle + ++ lib.optional withPydocstyle pydocstyle + ++ lib.optional withPyflakes pyflakes + ++ lib.optional withPylint pylint + ++ lib.optional withRope rope + ++ lib.optional withYapf yapf; checkInputs = [ flaky @@ -70,7 +76,10 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config"; + disabledTests = [ + # pytlint output changed + "test_lint_free_pylint" + ] ++ lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config"; disabledTestPaths = lib.optional (!withAutopep8) "test/plugins/test_autopep8_format.py" ++ lib.optional (!withRope) "test/plugins/test_completion.py" @@ -83,12 +92,6 @@ buildPythonPackage rec { ++ lib.optional (!withRope) "test/plugins/test_rope_rename.py" ++ lib.optional (!withYapf) "test/plugins/test_yapf_format.py"; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ - --replace "--cov pylsp --cov test" "" - ''; - preCheck = '' export HOME=$(mktemp -d); '';