{"repo":"ultralytics/pre-commit","free":true,"listed":false,"github":"https://github.com/ultralytics/pre-commit","clone":"git clone https://github.com/ultralytics/pre-commit.git","description":"Reusable Ultralytics pre-commit hooks for automated code-quality checks, formatting standards, and consistent repository hygiene.","language":"Python","stars":62,"topics":["pre-commit","ultralytics","automation","code-quality","developer-tools","formatting","linting","pre-commit-hooks","python"],"license":"AGPL-3.0","category":"dev-tools","readme_excerpt":"🛠️ Ultralytics Pre-commit Hooks Welcome to the Ultralytics pre-commit hooks repository! This collection features hooks developed by Ultralytics to enforce code quality and maintain consistent standards across our software projects. Integrating these hooks into your development workflow automates code validation, ensuring a high level of code hygiene and reducing manual review efforts. Learn more about the pre-commit framework itself on their official website. 🗂️ Repository Structure This repository is organized for clarity and ease of use: - Hook scripts: Individual Python scripts live at the repository root, each representing a distinct pre-commit hook designed for specific checks or code formatting tasks. - .pre-commit-hooks.yaml : The root configuration file defining the available hooks, making them discoverable and easy to integrate into your projects. - pyproject.toml : Packages the repository and exposes each hook script as a console script under [project.scripts] , which is what .pre-commit-hooks.yaml invokes. Available Hook Scripts 📂 Each hook script is a standalone Python program performing a specific pre-commit task. For instance: - capitalize comments.py : Ensures that standalone inline comments start with a capital letter, promoting readability and a professional coding style. Defining Hooks in .pre-commit-hooks.yaml 📘 The .pre-commit-hooks.yaml file lists all installable hooks. Here's an example structure for a hook definition: ➕ Adding New Hooks Interested i","default_branch":null,"files":null,"tree":[],"storefront":"/r/ultralytics","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ultralytics/pre-commit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}