From f14decb08615a735ee2192eae73d80a26fa4d6ee Mon Sep 17 00:00:00 2001 From: Hanketsu Date: Fri, 28 Feb 2025 11:34:24 +0100 Subject: battering: Add python-docformatter. * battering/packages/python-xyz.scm (python-docformatter): New variable. --- battering/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'battering/packages/python-xyz.scm') diff --git a/battering/packages/python-xyz.scm b/battering/packages/python-xyz.scm index c7bd357..d3fa0fc 100644 --- a/battering/packages/python-xyz.scm +++ b/battering/packages/python-xyz.scm @@ -393,3 +393,36 @@ declarative configuration.") library's @code{tokenize.untokenize()}, it preserves the original whitespace between tokens.") (license license:expat))) + +(define-public python-docformatter + (package + (name "python-docformatter") + (version "1.7.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/PyCQA/docformatter") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0szcazklngvn8yi2pl09s7dd858wlfww4df5vic8xh0arqdxwj21")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-charset-normalizer + python-tomli + python-untokenize)) + (native-inputs (list python-poetry-core + python-pytest + python-mock)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'set-virtual-env + (lambda _ + (setenv "VIRTUAL_ENV" #$output)))))) + (home-page "https://github.com/PyCQA/docformatter") + (synopsis "Formats docstrings to follow PEP 257") + (description "This package automatically formats docstrings to follow a +subset of the PEP 257 conventions") + (license license:expat))) -- cgit v1.2.3