FreeBSD Ports

textproc/py-docify 1.2.1

Script to add docstrings to Python type stubs using reflection

Repository
FreeBSD ports
Maintainer
[email protected]
Port added
Last update
Commit
5ab100563a
License
MIT
Categories
textproc, python
Package size
23.9 KiB, 99.9 KiB installed

Description

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.

Install

As a binary package — by origin, or by package name:

pkg install textproc/py-docify
pkg install py312-docify

From the ports tree:

cd /usr/ports/textproc/py-docify/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	py312-docify>0:textproc/py-docify

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest1.2.11.2.1--1.2.1
FreeBSD:14:quarterly1.2.11.2.1n/a-1.2.1
FreeBSD:15:latest1.2.11.2.1n/a--
FreeBSD:15:quarterly1.2.11.2.1n/an/an/a
FreeBSD:16:latest1.2.11.2.1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 1

Runtime 2

The full lists below include those, and their dependencies in turn.

All build dependencies 19
All run dependencies 11

No port depends on this one.

Configuration

No options to configure.

USES
python shebangfix
Service scripts
none

Files

distinfo 1
FileSizeSHA256
docify-1.2.1.tar.gz30605ed565259a3b20cd754438405b7830e12579f2223bb3c3f13c8e9318c258bc0a8
Master sites 1
  • PYPI

Commit history 1

DateCommitCreditsLog message
5ab100563a Po-Chuan Hsieh 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.