This page compares the source lines of code (SLOC) of psf/black and astral-sh/ruff using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-08-26, psf/black contains 108,294 total lines (101,105 code) across 73 files, while astral-sh/ruff contains 1,108,411 total lines (600,198 code) across 3,737 files as of 2026-08-26. astral-sh/ruff is about 5.9x the size of psf/black by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | psf/black | astral-sh/ruff |
|---|---|---|
| Files | 73 | 3,737 |
| Total lines | 108,294 | 1,108,411 |
| Code lines | 101,105 | 600,198 |
| Comment lines | 3,821 | 381,557 |
| Blank lines | 3,368 | 126,656 |
| Languages counted | 9 | 12 |
Top languages in psf/black: Python (99.1% of code), Vim Script (0.4% of code), TOML (0.2% of code). Top languages in astral-sh/ruff: Rust (91.6% of code), Python (3.1% of code), JSON (2.8% of code). Python, JSON, YAML appear in both top language lists; Vim Script, TOML appear only in psf/black's top languages; Rust, TSX appear only in astral-sh/ruff's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. psf/black was counted at ref main (commit 8947c48ef207) on 2026-08-26; astral-sh/ruff was counted at ref main (commit 007157d47915) on 2026-08-26. See the counting methodology for ignored directories and analysis options.
Evidence and next steps:
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
astral-sh/ruff has more code: 600,198 code lines versus 101,105 for psf/black, about 5.9x as much, based on cached OctoCounts reports as of 2026-08-26.
Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for psf/black, astral-sh/ruff, or any repository.
Methodology: both counts come from cached OctoCounts reports generated with tokei. psf/black was counted at ref main (commit 8947c48ef207) on 2026-08-26; astral-sh/ruff was counted at ref main (commit 007157d47915) on 2026-08-26. See the counting methodology for ignored directories and analysis options.
Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.