mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-19 00:13:33 +00:00
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.
This commit is contained in:
parent
8386430c51
commit
c18d4609ce
@ -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
|
||||
|
36
devel/py-docformatter/Makefile
Normal file
36
devel/py-docformatter/Makefile
Normal file
@ -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>
|
3
devel/py-docformatter/distinfo
Normal file
3
devel/py-docformatter/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1701083330
|
||||
SHA256 (docformatter-1.7.5.tar.gz) = ffed3da0daffa2e77f80ccba4f0e50bfa2755e1c10e130102571c890a61b246e
|
||||
SIZE (docformatter-1.7.5.tar.gz) = 25893
|
18
devel/py-docformatter/pkg-descr
Normal file
18
devel/py-docformatter/pkg-descr
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user