git: 5ab100563a99 - main - textproc/py-docify: Add py-docify 1.2.1

Po-Chuan Hsieh <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <6a85a84d.1d2d9.246f5f73__37575.6234674313$1787144323$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by sunpoet:

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

commit 5ab100563a99503d1171687a4d7259d801fae203
Author:     Po-Chuan Hsieh <[email protected]>
AuthorDate: 2026-08-19 12:24:33 +0000
Commit:     Po-Chuan Hsieh <[email protected]>
CommitDate: 2026-08-19 12:55:13 +0000

    textproc/py-docify: Add py-docify 1.2.1
    
    docify is a script to add docstrings to Python type stubs using reflection.
    
    Features:
    - Uses LibCST to parse and modify the stub file
    - Dynamically imports the actual module to get the runtime docstring
    - Handles most sys.version and sys.platform conditional blocks, will only add
      docstrings to the correct branch
    - Able to modify files in-place with -i or --in-place
    - Won't overwrite existing docstrings
    - With -b or --builtins-only, will only add docstrings for modules found in
      sys.builtin_module_names (stdlib modules written in C).
    - With --if-needed, will only add docstrings if the object's (Python) source
      code is unavailable. Useful for language servers like basedpyright that are
      able to extract docstrings from source code.
---
 textproc/Makefile            |  1 +
 textproc/py-docify/Makefile  | 25 +++++++++++++++++++++++++
 textproc/py-docify/distinfo  |  3 +++
 textproc/py-docify/pkg-descr | 14 ++++++++++++++
 4 files changed, 43 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index 854e7eccbca7..d897e580be5f 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1386,6 +1386,7 @@
     SUBDIR += py-dict2xml
     SUBDIR += py-diff-match-patch
     SUBDIR += py-dirtyjson
+    SUBDIR += py-docify
     SUBDIR += py-doclang
     SUBDIR += py-docling
     SUBDIR += py-docling-agent
diff --git a/textproc/py-docify/Makefile b/textproc/py-docify/Makefile
new file mode 100644
index 000000000000..cb6ca943e567
--- /dev/null
+++ b/textproc/py-docify/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	docify
+PORTVERSION=	1.2.1
+CATEGORIES=	textproc python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	[email protected]
+COMMENT=	Script to add docstrings to Python type stubs using reflection
+WWW=		https://github.com/atoerien/docify
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}libcst>=1.1.0:devel/py-libcst@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tqdm>=4.66.4:misc/py-tqdm@${PY_FLAVOR}
+
+USES=		python shebangfix
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+SHEBANG_FILES=	docify.py
+
+.include <bsd.port.mk>
diff --git a/textproc/py-docify/distinfo b/textproc/py-docify/distinfo
new file mode 100644
index 000000000000..2f4c1a2336b2
--- /dev/null
+++ b/textproc/py-docify/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1784005014
+SHA256 (docify-1.2.1.tar.gz) = ed565259a3b20cd754438405b7830e12579f2223bb3c3f13c8e9318c258bc0a8
+SIZE (docify-1.2.1.tar.gz) = 30605
diff --git a/textproc/py-docify/pkg-descr b/textproc/py-docify/pkg-descr
new file mode 100644
index 000000000000..373d7469a343
--- /dev/null
+++ b/textproc/py-docify/pkg-descr
@@ -0,0 +1,14 @@
+docify is a script to add docstrings to Python type stubs using reflection.
+
+Features:
+- Uses LibCST to parse and modify the stub file
+- Dynamically imports the actual module to get the runtime docstring
+- Handles most sys.version and sys.platform conditional blocks, will only add
+  docstrings to the correct branch
+- Able to modify files in-place with -i or --in-place
+- Won't overwrite existing docstrings
+- With -b or --builtins-only, will only add docstrings for modules found in
+  sys.builtin_module_names (stdlib modules written in C).
+- With --if-needed, will only add docstrings if the object's (Python) source
+  code is unavailable. Useful for language servers like basedpyright that are
+  able to extract docstrings from source code.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.