Sample
pyint-62b50613bdfc-I10
Deterministically remove some optional blank lines and bracketed line breaks
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.002 | 0–1; higher is more readable |
| Dorn | 0.245 | 0–1; higher is more readable |
| Mi | 0.519 | 0–1; higher is more readable |
| LLOC | 56 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.597 | 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. | 2161.997 | −71.346 |
| Source linesThe number of non-empty source lines. | 157 | +62.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.489 | −6.734 |
Intercept 8.87 + feature contributions = -6.41 (log-odds).
Score = sigmoid(-6.41) = 0.002.
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. | 158 | −4.558 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 89 | +2.341 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 156.99 | +1.785 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 89 | −1.621 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 103.956 | +0.873 |
| 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. | 103.975 | −0.739 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.023 | +0.721 |
Intercept 0.07 + feature contributions = -1.128 (log-odds).
Score = sigmoid(-1.128) = 0.245.
| Score | 0.519 |
|---|
| Score | 56 |
|---|
Run 1
The code has several readability issues. Structure is logical (class definition with nested enums and properties) but formatting is inconsistent. Import statements and exception imports are oddly aligned. Nesting is acceptable - only one level deep in the property method. Clarity of intent is mixed: docstrings are helpful, but the class constructor has 17 parameters with no type hints or defaults, making it unclear how to instantiate. Code length is appropriate for the number of attributes. Action granularity is inconsistent - some __slots__ entries and parameter lists have multiple items per line while others don't. Reading flow suffers significantly from misaligned formatting, inconsistent spacing around assignment operators in __slots__, and the odd line breaks in parameters. The is_hashable property has unnecessary parentheses and line breaks. Overall, the code functions but formatting inconsistencies and lack of parameter documentation make it harder to read than necessary.
Run 2
The code has reasonable logical organization with clear class structure and documentation, but suffers from inconsistent formatting that harms readability. The imports are partially aligned but have awkward spacing and line breaks. The ClassProps class is well-documented with clear attributes, but the __slots__ tuple and __init__ method have poorly aligned continuation lines with inconsistent spacing. The nested enums are logically placed and the property method is concise, though the return statement has odd indentation. Overall, the code is understandable but the inconsistent formatting creates unnecessary cognitive overhead. The mixed alignment styles in multi-line statements make the code feel disorganized despite the logical structure being sound. Score reflects good structure but poor formatting consistency.
Run 3
The code has some good documentation but suffers from severe structural and formatting issues. The nested class definitions are clear, but the overall layout is chaotic. Many lines have inconsistent indentation and spacing (e.g., the __slots__ tuple, the __init__ parameters). This breaks the natural reading flow and makes the code difficult to scan. The imports contain misaligned items and unnecessary parentheses, adding to the confusion. While the ClassProps docstring is detailed and helpful, the __init__ parameter list has no type hints or defaults despite being a public constructor, reducing clarity of intent. Action granularity is violated in places (e.g., multiple items per line in __slots__ and imports), and the code length is reasonable but not concise due to repetitive formatting. Overall, the logic is understandable, but the poor formatting, inconsistent nesting, and lack of parameter annotations make it significantly less readable.
Run 1
Code Structure: Logically organized around a class, related enums, initialization, and a derived property, but inconsistent spacing weakens visual separation. Nesting: Shallow and appropriate; nested enums do not introduce complex control flow. Clarity of intent: Descriptive names and extensive documentation clearly explain the class properties and hashability behavior. Code length: Documentation is useful but dominates the snippet; the long constructor and repetitive assignments add scanning overhead. Action granularity: Assignments consistently perform one action per line, although multiple imports, slot names, and parameters are awkwardly grouped on some lines. Reading flow: The overall progression is natural, but irregular indentation, crowded declarations, and missing blank lines interrupt readability.
Run 2
Code Structure: The class is logically organized into documentation, related enums, slots, initialization, and a derived property, although missing blank lines weaken separation. Nesting: Shallow and appropriate; nested enums introduce little complexity. Clarity of intent: Descriptive names and extensive documentation clearly explain the data model and hashability check, though constructor parameters lack type annotations. Code length: Documentation is useful, but the long parameter list and repetitive assignments make the class verbose. Action granularity: Assignments consistently perform one action per line; several imports, slot names, and parameters are crowded onto single lines. Reading flow: The conceptual progression is natural, but inconsistent spacing, awkward line breaks, and compressed declarations repeatedly interrupt scanning.
Run 3
Code Structure: Logically organized around class properties, related enums, initialization, and a derived property, but insufficient spacing weakens section boundaries. Nesting: Shallow and appropriate; nested enums introduce no difficult control flow. Clarity of intent: Descriptive names and comprehensive documentation clearly explain the purpose, although constructor parameters lack type annotations. Code length: Documentation and repetitive assignments make the snippet lengthy, but most serve a clear purpose. Action granularity: Assignments consistently perform one action per line; several imports, slot names, and parameters are crowded onto shared lines. Reading flow: The progression is natural, but irregular whitespace, inconsistent wrapping, and missing blank lines interrupt scanning. Overall, understandable design and explicit intent outweigh distracting formatting.