awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
psf avatar

psf/black

0
View on GitHub↗
41,578 星标·2,779 分支·Python·MIT·14 次浏览black.readthedocs.io/en/stable↗

Black

该项目是一个不妥协的、确定性的 Python 代码格式化程序。它的工作原理是将源代码解析为抽象语法树,并根据一套严格的、主观的样式规则重新生成它。通过自动化格式化过程,它消除了手动样式争论和配置开销,确保代码在整个项目中保持一致,无论原始输入如何。

该工具通过专注于速度和与开发工作流的无缝集成而脱颖而出。它利用基于内容的文件缓存和并行处理来在大型代码库上保持高性能,同时支持版本控制钩子,以在代码提交前强制执行样式一致性。为了保留项目历史,它提供了在版本控制追溯中忽略特定提交的机制,确保自动化的样式更改不会掩盖原始作者身份。

除了标准源文件外,该格式化程序还将其功能扩展到 Jupyter 笔记本、类型存根以及文档中的嵌入式代码示例。它通过主流文本编辑器和集成开发环境的插件,以及对语言服务器协议的支持,提供了广泛的兼容性。配置通过在目录层次结构中自动发现的项目级文件进行管理,从而允许在不同的开发环境中保持一致的行为。

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.
  • 代码质量工具 - Formats Python code automatically.
  • 开发者工具 - 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 历史

psf/black 的 Star 历史图表psf/black 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Black 的开源替代方案

相似的开源项目,按与 Black 的功能重合度排序。
  • astral-sh/ruffastral-sh 的头像

    astral-sh/ruff

    48,177在 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
    在 GitHub 上查看↗48,177
  • astral-sh/tyastral-sh 的头像

    astral-sh/ty

    17,287在 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
    在 GitHub 上查看↗17,287
  • koalaman/shellcheckkoalaman 的头像

    koalaman/shellcheck

    39,574在 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
    在 GitHub 上查看↗39,574
  • viatsko/awesome-vscodeviatsko 的头像

    viatsko/awesome-vscode

    28,754在 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
    在 GitHub 上查看↗28,754
查看 Black 的所有 30 个替代方案→

常见问题解答

psf/black 是做什么的?

该项目是一个不妥协的、确定性的 Python 代码格式化程序。它的工作原理是将源代码解析为抽象语法树,并根据一套严格的、主观的样式规则重新生成它。通过自动化格式化过程,它消除了手动样式争论和配置开销,确保代码在整个项目中保持一致,无论原始输入如何。

psf/black 的主要功能有哪些?

psf/black 的主要功能包括:Code Formatters, Python Development Tools, Automated Formatting Frameworks, Python Tooling, VS Code Extensions, Parsers & Lexers, Code Analysis, Code Analysis and Quality。

psf/black 有哪些开源替代品?

psf/black 的开源替代品包括: 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…