Sample
pyint-cfb73836ae63-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.359 | 0–1; higher is more readable |
| Mi | 0.05 | 0–1; higher is more readable |
| LLOC | 44 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.605 | 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. | 2844.331 | −93.863 |
| Source linesThe number of non-empty source lines. | 70 | +28 |
| 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.658 | −6.987 |
Intercept 8.87 + feature contributions = -63.98 (log-odds).
Score = sigmoid(-63.98) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 125.986 | −1.671 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 71 | −1.478 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 63 | +1.442 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 125.986 | +1.228 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 63 | −1.025 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 69.913 | +0.567 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.068 | +0.285 |
Intercept 0.07 + feature contributions = -0.58 (log-odds).
Score = sigmoid(-0.58) = 0.359.
| Score | 0.05 |
|---|
| Score | 44 |
|---|
Run 1
The code is generally readable, with clear class and method names, and logical organization. However, some formatting issues reduce clarity: inconsistent spacing and line breaks in field definitions (e.g., username, is_staff, is_active) disrupt reading flow. The nesting is flat, and each action is mostly on its own line, but some multiline arguments are awkwardly split. Intent is clear, but minor ambiguities exist due to formatting. Overall, it’s readable but could be improved with consistent formatting and cleaner line breaks.
Run 2
The code is moderately readable. Structure follows Django conventions, but formatting is inconsistent with excessive whitespace in some field definitions (e.g., username, is_staff) and cramped layouts in others. Several lines pack multiple arguments together, violating one-action-per-line and reducing clarity. The class methods are well-named and purposeful, but the class Meta block is cramped between fields and methods, disrupting reading flow. Some long help_text strings are awkwardly wrapped, making them harder to read. The overall organization is logical, but inconsistent spacing and argument formatting significantly impact readability.
Run 3
The code has decent logical organization but suffers from severe formatting inconsistencies that hurt readability. The AbstractUser class is well-structured with clear method separation, but many lines have excessive whitespace, misaligned parameters, and inconsistent indentation, making the code visually chaotic. For example, the username field's help_text has odd spacing and line breaks, and is_staff has parameters scattered across lines. Nesting is flat, which is good, and intent is mostly clear. However, the code length could be reduced with better formatting. Action granularity is generally one action per line, but the formatting makes it hard to follow. Reading flow is disrupted by these inconsistencies. The redundant email cleaning adds unnecessary complexity. Overall, the code could be significantly improved by applying consistent formatting standards (PEP 8) and removing the stray whitespace. The base structure is sound, but presentation undermines readability.
Run 1
Code Structure: The class logically groups model fields, configuration, metadata, and methods, although missing blank lines weaken separation. Nesting: Shallow nesting makes the code easy to follow; nested field arguments remain manageable. Clarity of intent: Descriptive names and docstrings clearly explain the user model and its methods, but undefined PermissionsMixin and UserManager references and unused imports introduce distractions. Code length: The implementation is reasonably concise, though the import list contains unnecessary entries. Action granularity: Methods generally perform one action per line, but several field declarations cram multiple arguments onto a single line. Reading flow: The progression from fields to behavior is natural, but inconsistent spacing, awkward line wrapping, and crowded declarations interrupt scanning.
Run 2
Code Structure: Fields, configuration, metadata, and methods are logically grouped, but unused imports and undefined PermissionsMixin and UserManager references distract. Nesting: Shallow nesting keeps the class easy to navigate. Clarity of intent: Descriptive names, field help text, and method docstrings clearly communicate the user model's purpose. Code length: The implementation is reasonably concise, although the import list adds unnecessary clutter. Action granularity: Methods generally perform one action per line, but several field arguments are crowded onto the same line with irregular spacing. Reading flow: The progression from fields to behavior is natural, yet inconsistent wrapping and missing blank lines between Meta, clean, and get_full_name interrupt scanning.
Run 3
Code Structure: Fields, configuration, metadata, and methods are logically grouped, but missing blank lines weaken separation. Nesting: Shallow nesting makes the class easy to follow; multiline field arguments are visually cluttered rather than deeply nested. Clarity of intent: Descriptive names and docstrings clearly convey a Django user model, although PermissionsMixin and UserManager are undefined in the provided snippet, and several imports are unused. Code length: Methods are concise, but unnecessary imports add noise. Action granularity: Methods generally perform one action per line, while multiple field arguments crowded onto single lines reduce scanability. Reading flow: The progression from fields to methods is natural, but irregular spacing, inconsistent wrapping, and cramped method boundaries interrupt reading.