Sample
pyint-ae40d3418233-I04
Replace names with deterministic minifier-style shortest identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.199 | 0–1; higher is more readable |
| Dorn | 0.767 | 0–1; higher is more readable |
| Mi | 0.655 | 0–1; higher is more readable |
| LLOC | 23 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.736 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 659.075 | −21.749 |
| Source linesThe number of non-empty source lines. | 47 | +18.8 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.877 | −7.315 |
Intercept 8.87 + feature contributions = -1.395 (log-odds).
Score = sigmoid(-1.395) = 0.199.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 48 | −0.663 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 39 | +0.612 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.034 | +0.608 |
| Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names. | 74.958 | +0.49 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 39 | −0.474 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 68.729 | +0.304 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 46.855 | +0.245 |
Intercept 0.07 + feature contributions = 1.193 (log-odds).
Score = sigmoid(1.193) = 0.767.
| Score | 0.655 |
|---|
| Score | 23 |
|---|
Run 1
The code demonstrates strong readability through clear module organization with logical import grouping, a well-named sentinel class, and appropriate use of enums. The structure is flat with minimal nesting, making the control flow easy to follow. The class purpose is immediately apparent from the docstring, which also includes helpful version annotations. The implementation is concise, using enum.auto() appropriately, and each method contains a single clear action. The reading flow is natural, with imports organized by type (future, stdlib, typing, third-party) followed by the class definition. Minor deductions possible for the large number of imports without immediate context, but this is justified for a foundational module. The code follows idiomatic Python patterns and would be easily understood by experienced developers.
Run 2
The code is well-structured and readable. It uses clear naming conventions, proper imports, and a meaningful class name `_Nothing` with a clear docstring explaining its purpose. The nesting is minimal, and actions are separated logically (imports, class definition, methods). The class methods are concise and each performs a single action. The use of `enum.Enum` and `enum.auto()` is idiomatic. Only minor issues: import block is somewhat long, and `_Nothing` could be private but that is intentional. Overall, highly readable with clear intent.
Run 3
The code is highly readable with clear structure: imports are organized in logical groups (stdlib, third-party, local), and the module-level class _Nothing is well-defined. The class has a clear purpose with a concise docstring explaining its role and version changes. Nesting is minimal and flat. The class uses Enum appropriately, and methods are short, single-action, and descriptive. Naming conventions follow Python standards, and type hints/annotations are present. The use of __future__ import and explicit imports from local modules demonstrates good practices. Minor deductions: a few imports appear unused (e.g., Callable, Mapping, TypeVar), and the versionchange directives slightly interrupt reading flow, but overall the code is exemplary.
Run 1
Code Structure: Imports are grouped logically, followed by a small, focused sentinel class. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The descriptive docstring clearly explains the sentinel’s purpose, and the methods directly express its representation and boolean behavior. Code length: The class is concise; the extensive imports are unused in this excerpt and add some visual overhead. Action granularity: Each statement performs one action, with no compressed multi-action lines. Reading flow: The progression from imports to documentation, enum member, and methods is natural. An additional blank line before the top-level class would improve conventional formatting.
Run 2
Code Structure: Imports are grouped by source, followed by a focused sentinel class. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The descriptive docstring clearly explains the sentinel's purpose, and the methods explicitly define its representation and truthiness. Code length: The implementation is concise; version notes add useful context, though the extensive imports are not used in this excerpt. Action granularity: Each statement performs a single action. Reading flow: The progression from imports to documentation, enum value, and behavior is natural. A second blank line before the top-level class would improve formatting consistency.
Run 3
Code Structure: Imports are grouped logically, followed by a focused sentinel class. Nesting: The code is flat, with only simple methods inside the class. Clarity of intent: Descriptive naming and a detailed docstring clearly explain the sentinel's purpose and behavior. Code length: The implementation is concise; the import list is extensive relative to this excerpt, and version-history notes add some reading overhead. Action granularity: Each statement performs one action, with no compressed or compound statements. Reading flow: The progression from dependencies to declaration and behavior is natural, though additional spacing between import groups and before the class would improve visual separation.