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]#
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.