git: c18d4609ce05 - main - devel/py-docformatter: Add py-docformatter 1.7.5

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 27 Nov 2023 18:08:20 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c18d4609ce0539c00b85a7e139ac9da1f4237b92

commit c18d4609ce0539c00b85a7e139ac9da1f4237b92
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-11-27 17:39:49 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-11-27 18:07:44 +0000

    devel/py-docformatter: Add py-docformatter 1.7.5
    
    docformatter automatically formats docstrings to follow a subset of the PEP 257
    conventions. Below are the relevant items quoted from PEP 257.
    - For consistency, always use triple double quotes around docstrings.
    - Triple quotes are used even though the string fits on one line.
    - Multi-line docstrings consist of a summary line just like a one-line
      docstring, followed by a blank line, followed by a more elaborate description.
    - Unless the entire docstring fits on a line, place the closing quotes on a line
      by themselves.
    
    docformatter also handles some of the PEP 8 conventions.
    - Don't write string literals that rely on significant trailing whitespace. Such
      trailing whitespace is visually indistinguishable and some editors (or more
      recently, reindent.py) will trim them.
    
    docformatter formats docstrings compatible with black when passed the --black
    option.
    
    docformatter formats field lists that use Epytext or Sphinx styles.
---
 devel/Makefile                  |  1 +
 devel/py-docformatter/Makefile  | 36 ++++++++++++++++++++++++++++++++++++
 devel/py-docformatter/distinfo  |  3 +++
 devel/py-docformatter/pkg-descr | 18 ++++++++++++++++++
 4 files changed, 58 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index a97496f92cab..cfe4cab123c3 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4574,6 +4574,7 @@
     SUBDIR += py-dj42-django-rq
     SUBDIR += py-dj42-graphene-django
     SUBDIR += py-django-rq
+    SUBDIR += py-docformatter
     SUBDIR += py-dockerpty
     SUBDIR += py-docopt
     SUBDIR += py-doctest-ignore-unicode
diff --git a/devel/py-docformatter/Makefile b/devel/py-docformatter/Makefile
new file mode 100644
index 000000000000..4f11b9e5460b
--- /dev/null
+++ b/devel/py-docformatter/Makefile
@@ -0,0 +1,36 @@
+PORTNAME=	docformatter
+PORTVERSION=	1.7.5
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Format docstrings to follow PEP 257
+WWW=		https://docformatter.readthedocs.io/en/latest/ \
+		https://github.com/PyCQA/docformatter
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}charset-normalizer>=3.0.0<4:textproc/py-charset-normalizer@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}untokenize>=0.1.1<0.2:devel/py-untokenize@${PY_FLAVOR}
+
+USES=		python shebangfix
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+SHEBANG_FILES=	src/docformatter/__main__.py
+
+OPTIONS_DEFINE=	TOMLI
+OPTIONS_DEFAULT=TOMLI
+TOMLI_DESC=	TOML (Tom's Obvious Minimal Language) support
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MTOMLI} && ${PYTHON_REL} < 31100
+RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}tomli>=2.0.0<3:textproc/py-tomli@${PY_FLAVOR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-docformatter/distinfo b/devel/py-docformatter/distinfo
new file mode 100644
index 000000000000..eca1c0c85b69
--- /dev/null
+++ b/devel/py-docformatter/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1701083330
+SHA256 (docformatter-1.7.5.tar.gz) = ffed3da0daffa2e77f80ccba4f0e50bfa2755e1c10e130102571c890a61b246e
+SIZE (docformatter-1.7.5.tar.gz) = 25893
diff --git a/devel/py-docformatter/pkg-descr b/devel/py-docformatter/pkg-descr
new file mode 100644
index 000000000000..e852b01270d0
--- /dev/null
+++ b/devel/py-docformatter/pkg-descr
@@ -0,0 +1,18 @@
+docformatter automatically formats docstrings to follow a subset of the PEP 257
+conventions. Below are the relevant items quoted from PEP 257.
+- For consistency, always use triple double quotes around docstrings.
+- Triple quotes are used even though the string fits on one line.
+- Multi-line docstrings consist of a summary line just like a one-line
+  docstring, followed by a blank line, followed by a more elaborate description.
+- Unless the entire docstring fits on a line, place the closing quotes on a line
+  by themselves.
+
+docformatter also handles some of the PEP 8 conventions.
+- Don't write string literals that rely on significant trailing whitespace. Such
+  trailing whitespace is visually indistinguishable and some editors (or more
+  recently, reindent.py) will trim them.
+
+docformatter formats docstrings compatible with black when passed the --black
+option.
+
+docformatter formats field lists that use Epytext or Sphinx styles.