Sample
pyint-0ef1f4b0a18c-I10
Deterministically remove some optional blank lines and bracketed line breaks
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.001 | 0–1; higher is more readable |
| Mi | 0.161 | 0–1; higher is more readable |
| LLOC | 188 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.414 | 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. | 15751.83 | −519.81 |
| Source linesThe number of non-empty source lines. | 375 | +150 |
| 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.169 | −6.253 |
Intercept 8.87 + feature contributions = -367.194 (log-odds).
Score = sigmoid(-367.194) = 0.
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. | 376 | −12.277 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 335 | +10.85 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 335 | −7.266 |
| 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. | 242.981 | −6.627 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 374.84 | +4.83 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 242.995 | +3.116 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.054 | +0.419 |
Intercept 0.07 + feature contributions = -6.884 (log-odds).
Score = sigmoid(-6.884) = 0.001.
| Score | 0.161 |
|---|
| Score | 188 |
|---|
Run 1
This code exhibits severe readability issues across multiple criteria. The most glaring problem is the inconsistent and chaotic formatting: import statements have random spacing and alignment, function parameters are scattered across lines with irregular indentation, and method definitions lack consistent spacing between them. The nesting is acceptable but the visual structure is tangled due to these formatting issues. Multiple actions are packed onto single lines (e.g., class attributes, return statements, list comprehensions) violating the one-action-per-line principle. While individual methods have clear purposes, the overall reading flow is severely disrupted by the erratic formatting - some lines have excessive whitespace, others have none, and alignment seems arbitrary rather than intentional. The imports section is particularly problematic with random spacing patterns that make it difficult to scan. The code length is reasonable for Django internals, but the presentation makes it unnecessarily difficult to parse. This appears to be the result of automated refactoring or careless editing that destroyed the original formatting without any attempt to restore consistency.
Run 2
The code is severely impaired by inconsistent formatting. Some imports and function arguments have excessive whitespace (e.g., `__init__( self, to,`), while others lack proper spacing. Many lines are overly long due to bizarre line breaks and alignment, making it hard to follow. Indentation is inconsistent, especially in multi-line expressions and return statements (e.g., `return [ *super().check(**kwargs), ... ]`). The code contains multiple actions per line and unnatural line breaks that disrupt reading flow. While the class structure and method names are logically organized (suggesting an underlying coherent design), the presentation undermines clarity. Variable and method names are mostly descriptive, and docstrings exist for some methods, which aids intent, but these are overshadowed by the chaotic layout. The file appears to be a corrupted or poorly auto-formatted version of otherwise standard Django code. A human reader would struggle to parse the structure quickly.
Run 3
The code is poorly readable due to severe inconsistent formatting and lack of visual separation. Critical issues include: (1) Inconsistent indentation - many function calls and definitions have excessive whitespace that breaks natural reading flow; (2) Import statements are scattered and misaligned; (3) Method bodies are cramped together without blank lines between class methods, making it hard to distinguish logical blocks; (4) Multiple actions are packed onto single lines (e.g., error tuple returns with multiple list expansions); (5) Some lines are excessively long (100+ characters), exceeding typical readability standards; (6) Despite following Django conventions for imports and using clear naming, the overall structure appears to have been auto-formatted incorrectly, destroying the natural vertical flow. The logical organization is intact (it's standard Django field inheritance), but visual noise from formatting overwhelms readability. Action granularity is violated with complex multi-line expressions. While individual method purposes are clear from names and docstrings, the execution is disorganized, making the code difficult to scan and maintain.
Run 1
Code Structure: Well-defined methods separate validation, field resolution, serialization, and relationship setup, although missing blank lines weaken organization. Nesting: Mostly manageable with early returns, but validation and deconstruction contain several nested branches. Clarity of intent: Descriptive method names, comments, and docstrings explain framework-specific behavior; undefined names in the snippet and reliance on Django internals require external context. Code length: Long but largely justified by distinct responsibilities, with some repetitive validation and error construction. Action granularity: Statements generally perform one action each, though many arguments and import items are crowded onto single lines. Reading flow: Logical method grouping helps, but irregular whitespace, inconsistent wrapping, and compressed method boundaries repeatedly interrupt scanning. Overall, the underlying design is readable, but presentation substantially reduces accessibility.
Run 2
Code Structure: Methods group validation, field resolution, metadata, and descriptor setup logically, although the large class requires substantial context. Nesting: Mostly moderate, with early returns reducing depth; validation and deconstruction contain some nested branches. Clarity of intent: Descriptive method names, comments, and docstrings explain responsibilities, but framework-specific concepts and externally defined symbols complicate standalone reading. Code length: Generally justified by functionality, though repetitive error construction and extensive metadata handling increase reading effort. Action granularity: Most statements perform one action, but multiple arguments and import names crowded onto individual lines hinder scanning. Reading flow: The method sequence is coherent, but inconsistent whitespace, irregular line wrapping, misplaced closing parentheses, and missing blank lines between methods repeatedly disrupt visual flow.
Run 3
Code Structure: Methods logically separate validation, field resolution, metadata, and descriptor setup, although the class covers many responsibilities. Nesting: Mostly moderate, with guard clauses reducing depth; validation and deconstruction contain some heavier nesting. Clarity of intent: Descriptive method names, comments, and docstrings explain behavior well, but framework-specific concepts and definitions absent from the snippet require external context. Code length: Length largely reflects functionality, though repeated validation and verbose error construction add reading overhead. Action granularity: Statements generally perform one action, but multiple arguments and imported names crowded onto individual lines impede scanning. Reading flow: Method ordering is coherent, yet irregular spacing, inconsistent line wrapping, and missing blank lines between methods significantly disrupt visual flow. Overall, the underlying organization is readable, but formatting substantially weakens accessibility.