- Applies to the full repo.
- Public API lives in flat
util_*.pymodules re-exported viaubelt/__init__.py. - After API changes, run
mkinit ubelt -wand adjust manually if needed.
- Support Python >=3.8.
- Avoid typing code that adds runtime overhead (e.g. cast).
- Prefer putting typing code in if typing.TYPE_CHECKING blocks.
- Maintain 100% coverage.
- Use
python run_tests.py(pytest + coverage + xdoctest). - Use
./run_doctests.shfor xdoctest-only runs. - xdoctest (not stdlib doctest) is required.
- Follow PEP 8; mark exceptions with
# NOQA. - Use Google-style docstrings with runnable examples.
- Requirements in
requirements/*.txt, dynamically referenced fromsetup.py. - Keep them synced; migration to full
pyproject.tomlpending.
- Prefer rich docstrings to separate docs.
- Keep
docs/changes consistent with in-code documentation.
- Gradually expand type coverage without breaking compatibility.
- Review
ubelt/__init__.pyignore/explicit lists when editing platform helpers.