python310Packages.docformatter: 1.5.0 -> 1.5.1
https://github.com/PyCQA/docformatter/blob/v1.5.1/CHANGELOG.md
This commit is contained in:
parent
72c236b163
commit
5a2b689d25
2 changed files with 53 additions and 3 deletions
|
@ -2,6 +2,9 @@
|
|||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, poetry-core
|
||||
, charset-normalizer
|
||||
, tomli
|
||||
, untokenize
|
||||
, mock
|
||||
, pytestCheckHook
|
||||
|
@ -9,20 +12,37 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "docformatter";
|
||||
version = "1.5.0";
|
||||
version = "1.5.1";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
format = "setuptools";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PyCQA";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-GSfsM6sPSLOIH0YJYFVTB3SigI62/ps51mA2iZ7GOEg=";
|
||||
hash = "sha256-r+8FOl9Rrfi3V8f8wD41bRsaqDb+UrOBWuR3goK43xY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./test-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace 'charset_normalizer = "^2.0.0"' 'charset_normalizer = ">=2.0.0"'
|
||||
substituteInPlace tests/conftest.py \
|
||||
--subst-var-by docformatter $out/bin/docformatter
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
charset-normalizer
|
||||
tomli
|
||||
untokenize
|
||||
];
|
||||
|
||||
|
@ -34,6 +54,7 @@ buildPythonPackage rec {
|
|||
pythonImportsCheck = [ "docformatter" ];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/PyCQA/docformatter/blob/${src.rev}/CHANGELOG.md";
|
||||
description = "Formats docstrings to follow PEP 257";
|
||||
homepage = "https://github.com/myint/docformatter";
|
||||
license = lib.licenses.mit;
|
||||
|
|
29
pkgs/development/python-modules/docformatter/test-path.patch
Normal file
29
pkgs/development/python-modules/docformatter/test-path.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||
index 5f5a9aa..3289222 100644
|
||||
--- a/tests/conftest.py
|
||||
+++ b/tests/conftest.py
|
||||
@@ -92,21 +92,9 @@ def run_docformatter(arguments, temporary_file):
|
||||
|
||||
Return subprocess object.
|
||||
"""
|
||||
- if "DOCFORMATTER_COVERAGE" in os.environ and int(
|
||||
- os.environ["DOCFORMATTER_COVERAGE"]
|
||||
- ):
|
||||
- DOCFORMATTER_COMMAND = [
|
||||
- "coverage",
|
||||
- "run",
|
||||
- "--branch",
|
||||
- "--parallel",
|
||||
- "--omit=*/site-packages/*",
|
||||
- os.environ["VIRTUAL_ENV"] + "/bin/docformatter",
|
||||
- ]
|
||||
- else:
|
||||
- DOCFORMATTER_COMMAND = [
|
||||
- os.environ["VIRTUAL_ENV"] + "/bin/docformatter",
|
||||
- ] # pragma: no cover
|
||||
+ DOCFORMATTER_COMMAND = [
|
||||
+ "@docformatter@"
|
||||
+ ]
|
||||
|
||||
if "-" not in arguments:
|
||||
arguments.append(temporary_file)
|
Loading…
Reference in a new issue