diff options
| author | Vinicius Monego <monego@posteo.net> | 2026-03-29 13:39:24 -0300 |
|---|---|---|
| committer | Vinicius Monego <monego@posteo.net> | 2026-04-22 21:37:39 -0300 |
| commit | 87d45d5b766031dda7d82ed1af030e4553669e50 (patch) | |
| tree | 73f6080fb9f3e85c09609913b9404e6a92c6979e /gnu/packages/python-check.scm | |
| parent | bf3f52609ddebcfc3e1f2ca9b36364455e732e66 (diff) | |
gnu: Add python-lsp-ruff.
* gnu/packages/python-check.scm (python-lsp-ruff): New variable.
Change-Id: I4bcf0fc8abc5889547fc2a350916b10b5f4d053a
Diffstat (limited to 'gnu/packages/python-check.scm')
| -rw-r--r-- | gnu/packages/python-check.scm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 9a0fc1a42d6..8e859119e49 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm | |||
| @@ -1663,6 +1663,49 @@ cProfile or profile modules, depending on what is available. It's a | |||
| 1663 | successor of @url{https://github.com/rkern/line_profiler}.") | 1663 | successor of @url{https://github.com/rkern/line_profiler}.") |
| 1664 | (license license:bsd-3))) | 1664 | (license license:bsd-3))) |
| 1665 | 1665 | ||
| 1666 | (define-public python-lsp-ruff | ||
| 1667 | (package | ||
| 1668 | (name "python-lsp-ruff") | ||
| 1669 | (version "2.3.1") | ||
| 1670 | (source | ||
| 1671 | (origin | ||
| 1672 | (method git-fetch) | ||
| 1673 | (uri (git-reference | ||
| 1674 | (url "https://github.com/python-lsp/python-lsp-ruff") | ||
| 1675 | (commit (string-append "v" version)))) | ||
| 1676 | (file-name (git-file-name name version)) | ||
| 1677 | (sha256 | ||
| 1678 | (base32 "1xjvqyn3qn54cq63ay9n1rr1wkzx04bf99cki68n46gm8nwjvn6m")))) | ||
| 1679 | (build-system pyproject-build-system) | ||
| 1680 | (arguments | ||
| 1681 | (list | ||
| 1682 | #:test-flags #~(list (string-append | ||
| 1683 | ;; Tests below do a diff check on the ruff store | ||
| 1684 | ;; path against the python store path. | ||
| 1685 | "-k" "not test_ruff_settings" | ||
| 1686 | " and not test_ruff_config_param")) | ||
| 1687 | #:phases #~(modify-phases %standard-phases | ||
| 1688 | (add-after 'unpack 'use-system-ruff | ||
| 1689 | ;; This package requests Ruff from PyPI. Make it use | ||
| 1690 | ;; the guix package instead. | ||
| 1691 | (lambda _ | ||
| 1692 | (substitute* "pyproject.toml" | ||
| 1693 | (("\"ruff.*\",") ""))))))) | ||
| 1694 | (propagated-inputs (list python-cattrs | ||
| 1695 | python-lsprotocol | ||
| 1696 | python-lsp-server | ||
| 1697 | python-tomli | ||
| 1698 | ;; Ruff is detected by shutil.which. | ||
| 1699 | ruff)) | ||
| 1700 | (native-inputs (list python-pytest python-setuptools)) | ||
| 1701 | (home-page "https://github.com/python-lsp/python-lsp-ruff") | ||
| 1702 | (synopsis "Ruff linting plugin for @code{pylsp}") | ||
| 1703 | (description | ||
| 1704 | "@code{python-lsp-ruff} is a plugin for @code{python-lsp-server} that | ||
| 1705 | adds linting, code actions and formatting capabilities that are provided by | ||
| 1706 | Ruff.") | ||
| 1707 | (license license:expat))) | ||
| 1708 | |||
| 1666 | (define-public python-mamba | 1709 | (define-public python-mamba |
| 1667 | (package | 1710 | (package |
| 1668 | (name "python-mamba") | 1711 | (name "python-mamba") |
