awesome-repositories.com
Blog
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
psf avatar

psf/black

0
View on GitHub↗
41,578 stars·2,779 forks·Python·MIT·13 viewsblack.readthedocs.io/en/stable↗

Black

This project is an uncompromising, deterministic code formatter for Python. It functions by parsing source code into an abstract syntax tree and regenerating it according to a rigid, opinionated set of style rules. By automating the formatting process, it eliminates manual style debates and configuration overhead, ensuring that code remains consistent across entire projects regardless of the original input.

The tool distinguishes itself through its focus on speed and seamless integration into development workflows. It utilizes content-based file caching and parallel processing to maintain high performance on large codebases, while supporting version control hooks to enforce style consistency before code is committed. To preserve project history, it provides mechanisms to ignore specific commits in version control blame tracking, ensuring that automated style changes do not obscure original authorship.

Beyond standard source files, the formatter extends its capabilities to include Jupyter notebooks, type stubs, and embedded code examples within documentation. It offers broad compatibility through plugins for major text editors and integrated development environments, as well as support for the language server protocol. Configuration is managed through project-level files that are automatically discovered within the directory hierarchy, allowing for consistent behavior across diverse development environments.

Features

  • Code Formatters - Automatically enforces a strict, uniform style across source files.
  • Python Development Tools - Provides an uncompromising, deterministic code formatter for the Python ecosystem.
  • Automated Formatting Frameworks - Enforces a consistent style across a codebase by automatically applying opinionated rules to source files.
  • Python Tooling - Applies opinionated style rules to Python source code, supporting customizable line lengths and target versions.
  • VS Code Extensions - Automates code styling within VS Code via extensions.
  • Parsers & Lexers - Parses and reconstructs source code according to predefined syntactic rules.
  • Code Analysis - Listed in the “Code Analysis” section of the Awesome Python awesome list.
  • Code Analysis and Quality - Uncompromising, opinionated code formatter.
  • Code Formatters - Uncompromising and opinionated automatic code formatter.
  • Code Quality Tools - Formats Python code automatically.
  • Developer Tools - Uncompromising Python code formatter.
  • Linting And Formatting - Uncompromising Python code formatter.
  • Python Packages - Code formatting for Python.
  • Notebook Formatting Tools - Applies consistent styling to Jupyter notebook files.
  • Development Workflow Integrations - Connects automated styling tools directly into text editors and continuous integration pipelines.
  • Language Server Protocols - Connects code editors to formatting tools using standard protocols.
  • Git Hooks - Ensures only properly formatted code enters the repository history via pre-commit checks.
  • Import Sorters - Aligns import sorting behavior with project style guidelines.
  • Project Configuration Discovery - Defines project-specific formatting defaults and exclusion patterns in a configuration file that is automatically discovered.
  • Notebook Automation Tools - Integrates notebook file processing into development workflows.
  • Notebook Formatters - Applies consistent styling to interactive notebook files to improve readability.
  • Build Caches - Stores results on disk to skip unmodified files and speed up workflows.
  • Build Caching Systems - Stores hashes of processed files to skip redundant formatting operations and significantly improve performance on large codebases.
  • File Exclusion Rules - Allows preventing specific files or directories from being modified.
  • Line Wrapping Engines - Wraps long lines of code by applying uniform whitespace rules and bracket-based indentation.
  • Version Control Ignore Parsers - Automatically skips files listed in version control ignore files.
  • Version Control Utilities - Supports excluding specific commits from history tracking to preserve accurate code authorship during automated formatting.

Star history

Star history chart for psf/blackStar history chart for psf/black

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does psf/black do?

This project is an uncompromising, deterministic code formatter for Python. It functions by parsing source code into an abstract syntax tree and regenerating it according to a rigid, opinionated set of style rules. By automating the formatting process, it eliminates manual style debates and configuration overhead, ensuring that code remains consistent across entire projects regardless of the original input.

What are the main features of psf/black?

The main features of psf/black are: Code Formatters, Python Development Tools, Automated Formatting Frameworks, Python Tooling, VS Code Extensions, Parsers & Lexers, Code Analysis, Code Analysis and Quality.

What are some open-source alternatives to psf/black?

Open-source alternatives to psf/black include: astral-sh/ruff — Ruff is a high-performance static analysis and code formatting tool designed for Python. Built in Rust, it functions… astral-sh/ty — This project is a high-performance static type checker and comprehensive development toolkit for Python. It functions… koalaman/shellcheck — This project is a static analysis tool and linter designed to improve the quality, reliability, and portability of… viatsko/awesome-vscode — This project is a curated directory of resources, extensions, and themes designed to extend the functionality of the… pycqa/isort — isort is a Python import sorter and code formatter that organizes import statements into alphabetical groups and… google/yapf — YAPF is a Python code formatter and style compliance tool. It operates as an AST-based reformatter that uses concrete…

Open-source alternatives to Black

Similar open-source projects, ranked by how many features they share with Black.
  • astral-sh/ruffastral-sh avatar

    astral-sh/ruff

    48,177View on GitHub↗

    Ruff is a high-performance static analysis and code formatting tool designed for Python. Built in Rust, it functions as a comprehensive engine that scans source code to detect programming errors, security vulnerabilities, and deviations from established coding standards. By parsing source code into a structured tree representation, it provides both automated linting and style enforcement across entire projects. The tool distinguishes itself through its speed and deep integration into the development lifecycle. It utilizes parallelized file processing to maximize throughput on large codebases

    Rustlinterpep8python
    View on GitHub↗48,177
  • astral-sh/tyastral-sh avatar

    astral-sh/ty

    17,287View on GitHub↗

    This project is a high-performance static type checker and comprehensive development toolkit for Python. It functions as a core analysis engine that identifies type inconsistencies and enforces code correctness, while simultaneously providing a language server implementation to deliver real-time diagnostics and intelligence directly within development environments. The tool distinguishes itself through a parallelized execution engine that maximizes performance across large-scale codebases and monorepo structures. It supports gradual type adoption, allowing developers to integrate type checkin

    Python
    View on GitHub↗17,287
  • koalaman/shellcheckkoalaman avatar

    koalaman/shellcheck

    39,574View on GitHub↗

    This project is a static analysis tool and linter designed to improve the quality, reliability, and portability of shell scripts. By performing deep structural analysis, it identifies common programming pitfalls, syntax errors, and security vulnerabilities before scripts are executed. It functions as an automated code reviewer that enforces best practices and helps developers maintain consistent, robust code across different operating environments. The tool distinguishes itself through its dialect-aware grammar resolution, which adapts its parsing logic based on the specific shell interpreter

    Haskellbashdeveloper-toolshaskell
    View on GitHub↗39,574
  • viatsko/awesome-vscodeviatsko avatar

    viatsko/awesome-vscode

    28,754View on GitHub↗

    This project is a curated directory of resources, extensions, and themes designed to extend the functionality of the Visual Studio Code editor. It serves as a comprehensive index for developers seeking to enhance their coding environment, offering a structured collection of community-driven tools that streamline development workflows and improve editor productivity. The directory distinguishes itself by organizing a vast ecosystem of plugins into logical categories, ranging from language-specific intelligence and version control integrations to advanced productivity utilities. It highlights t

    JavaScriptawesomeawesome-listlist
    View on GitHub↗28,754
See all 30 alternatives to Black→