characterization#

Detect tooling and content present in a repository.

class RepositoryCharacterization(has_python_code: bool, package_manager: PackageManagerChoice, type_checkers: frozenset[TypeChecker])[source]#

Bases: object

The repository traits that influence policy configuration.

has_python_code: bool[source]#
package_manager: PackageManagerChoice[source]#
type_checkers: frozenset[TypeChecker][source]#
has_documentation() → bool[source]#
uses_quarto() → bool[source]#

Check whether Quarto is the documentation system of this repository.

A repository that is documented with Sphinx can contain a Quarto sub-site, so the presence of a Sphinx configuration file takes precedence.

has_notebooks() → bool[source]#
has_python_code() → bool[source]#
characterize_repository() → RepositoryCharacterization[source]#
detect_package_manager(pyproject: dict[str, Any] | None = None) → PackageManagerChoice[source]#

Infer the active Python environment/package manager from its configuration.

detect_type_checkers(pyproject: dict[str, Any] | None = None) → set[TypeChecker][source]#

Infer configured type checkers from files, TOML tables, and pre-commit hooks.